September 2002
Beginner to intermediate
216 pages
7h 43m
English
One possible route to user and
password
information is through the
getpw*
family of functions. However,
those functions are not ideal for working with systems like Mac OS X
that support multiple directories (flat files, NetInfo, LDAP, etc.).
In particular, getpwnam( ) is not guaranteed to
return a crypted password if the system has been configured to use
another scheme, such as MD5 passwords. You should use the
PAM API
instead. PAM is included with, or available for, many flavors of
Unix, so you can use it to write portable code. For more information
on PAM, see the pam(8) manpage.