Name
chkpasswd
Synopsis
chkpasswd [-c] [-iinfosystem
] [-llocation
] [username
]
Useful for scripts, this prompts for a password which is then compared against the appropriate directory service for the user specified. If the password is correct, chkpasswd returns 0; otherwise, it returns 1, and the string “Sorry” is printed to standard error.
Options
- -c
Compare user input with the password hash directly, rather than running it through the crypt algorithm first.
- -i
Specify the directory service to use, which may be file, netinfo, nis, or opendirectory.
- -l
Depending on the directory service being used, it’s either a file (defaults to /etc/master.passwd), a NetInfo domain or server/tag combo, a NIS domain, or an Open Directory node (like /NetInfo/root).
-
username
Designate whose password is checked. It defaults to that of the user running the command.
Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.