unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

PWDAUTH(3)                 Library Functions Manual                 PWDAUTH(3)



NAME
       pwdauth, grpauth - password authentication routines

SYNOPSIS
       int pwdauth(user, password)
       char *user;
       char *password;

       int grpauth(group, password)
       char *group;
       char *password;

DESCRIPTION
       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.

FILES
       /etc/passwd
       /etc/group

SEE ALSO
       getgraent(3), getgrent(3V), getpwaent(3), getpwent(3V), pwdauthd(8C)

NOTES
       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)