Clarification of Answer by
maniac-ga
on
03 Feb 2003 18:30 PST
Hello Denco,
The following should explain more fully the approach I suggested. I
did not suggest you write a module, but to use code that already
exists. You will have to make changes to the PAM configuration files,
but that is relatively straight forward to perform.
As I stated before, the preferred approach is to use modules and
support provided by Sun. However, based on what I can find, the
Solaris modules are not compatible with MD5 encoding on Linux. Until
Sun provides compatible modules, you need to provide your own.
That does not mean, that you must "write a module". I provided a
reference where system administrators have built PAM modules for
Solaris from the source code used on Linux systems. To repeat, the
reference at
http://www.dementia.org/~shadow/pam.html
which goes into some detail about this including guidance on how to
build the modules. This site is also referred to by the master Linux
PAM sites listed below. He includes an email address for contact. If
you send him email, he may make his already built modules available
and then you can skip the module build steps.
You should have access to PAM source code for your Linux distribution.
If not, a search such as
http://www.rpmfind.net/linux/rpm2html/search.php?query=pam&submit=Search+...
will provide a series of references. Scroll down to find the source
that matches your Linux distribution. As an alternative, it may be
good to download the Rawhide 1.0 source for Sparc; it may have patches
that make it work better on your Solaris system. Another alternative
is to download the source from a primary distribution site such as
ftp://ftp.kernel.org/pub/linux/libs/pam/
or if that is busy, try
http://kernel.netnitco.net/linux/libs/pam/
and download the version of source code you want to use.
As a test, I downloaded a copy of Linux-PAM-0.77 at
http://kernel.netnitco.net/linux/libs/pam/pre/library/Linux-PAM-0.77.tar.gz
and reviewed the README file that accompanies it. Basically, it asks
you to
./configure
and then
make
to generate the PAM modules, utilities, etc. These steps will require
the appropriate development tools on your Solaris system.
Note that the Linux source to pam_unix is in
Linux-PAM-0.77/modules/pam_unix
It may be possible to build just this module; check the README there
for more information.
After it is built, I suggest renaming this module to pam_linux or some
similar name and then copying it into the same directory as your
existing pam_unix modules are on Solaris.
Then you can change the PAM configuration file to include a line
like...
login auth sufficient /usr/lib/security/pam_linux.so.1
at each place where you want to use the Linux passwords instead of the
Solaris passwords. The phrase sufficient allows that authentication to
be enough for the user to get in. Note that the sufficient line must
be in front of the required line if you want either method to work.
This kind of handling is described in the PAM Administrator document
at the Sun site I referred to before.
This may not be as simple as you expected, but appears to be the only
way to do what you are asking for.
--Maniac