PWDAUTH(3) Library Functions Manual PWDAUTH(3)
pwdauth, grpauth - password authentication routines
int pwdauth(user, password)
int grpauth(group, password)
pwdauth() and grpauth() determine whether the given guess at a password
is valid for the given user or group. If the password is valid, the
functions return 0.
A password is valid if the password when encrypted matches the
encrypted password in the appropriate file. For pwdauth(), if the
password.adjunct file exists, the encrypted password will be in either
the local or the Network Information Service (NIS) version of that
file. Otherwise, either the local or NIS passwd file will be used.
For grpauth(), the group.adjunct file (if it exists) or the group file
(otherwise) will be checked on the local machine and then using the NIS
service. In all cases, the local files will be checked before the NIS
files. Also, if the adjunct files exist, the main file will never be
used for authentication even if they include encrypted passwords.
Both pwdauth() and grpauth() interface to the authentication daemon,
rpc.pwdauthd, to do the checking of the adjunct files. This daemon
must be running on any system that provides password authentication.
getgraent(3), getgrent(3V), getpwaent(3), getpwent(3V), pwdauthd(8C)
The Network Information Service (NIS) was formerly known as Sun Yellow
Pages (YP). The functionality of the two remains the same; only the
name has changed.
14 December 1987 PWDAUTH(3)