sreangsu acharyya forced the electrons to say:
> Never got to read the Pam docs, but you can do what you ask for with a bit
> of c. Use getpw_nam() to locate the passwd string as stored in the
> /etc/passwd. Take the 1st 2 chars and save that as a string. Lets call
> this salt[2].

<rest snipped>

That is all old news. Linux distributions use shadowed passwords - and
MD5 hashing, in the case of RedHat at least. This technique will not
work there.

The most portable (that is, across linux distributions) should be the
PAM technique. All distributions that I know of, plus *BSD are into PAM
nowadays. And it is easy to make any application PAM-aware (there are
excellent docs for the PAM programmer included in the package).

Binand


----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/linux-india-help

Reply via email to