January 2003
Intermediate to advanced
832 pages
32h 40m
English
chkpasswd
chkpasswd [-c] [-iinfosystem] [-llocation] [username]
Useful for scripts, this prompts for a password that is then compared
against the appropriate directory service for the user specified. If
the password is incorrect, the string Sorry is
output. (Strangely, chkpasswd appears to have a
return value of 0 in either case.)
-c
User input is compared with the password hash directly, rather than
running it through the crypt algorithm first.
-i
Specifies the directory service to use, and may be
file, netinfo (the
default), or nis.
-l
Depending on the directory service being used, it’s
either a filename (defaults to
/etc/master.passwd), a NetInfo domain name or
server/tag combo, or an NIS domain name.
sername
Designates whose password will be checked. It defaults to that of the user running the command.