Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pwdauth(8) [minix man page]

PWDAUTH()																 PWDAUTH()

NAME
pwdauth - password authentication program SYNOPSIS
/usr/lib/pwdauth DESCRIPTION
Pwdauth is a program that is used by the crypt(3) function to do the hard work. It is a setuid root utility so that it is able to read the shadow password file. Pwdauth expects on standard input two null terminated strings, the password typed by the user, and the salt. That is, the two arguments of the crypt function. The input read in a single read call must be 1024 characters or less including the nulls. Pwdauth takes one of two actions depending on the salt. If the salt has the form "##user" then the user is used to index the shadow password file to obtain the encrypted password. The input password is encrypted with the one-way encryption function contained within pwdauth and compared to the encrypted password from the shadow password file. If equal then pwdauth returns the string "##user" with exit code 0, otherwise exit code 2 to signal failure. The string "##user" is also returned if both the shadow password and the input password are null strings to allow a password-less login. If the salt is not of the form "##user" then the password is encrypted and the result of the encryption is returned. If salt and password are null strings then a null string is returned. The return value is written to standard output as a null terminated string of 1024 characters or less including the null. The exit code is 1 on any error. SEE ALSO
crypt(3), passwd(5). NOTES
A password must be checked like in this example: pw_ok = (strcmp(crypt(key, pw->pw_passwd), pw->pw_passwd) == 0); The second argument of crypt must be the entire encrypted password and not just the two character salt. AUTHOR
Kees J. Bot (kjb@cs.vu.nl) PWDAUTH()

Check Out this Related Man Page

ns_crypt(3aolserver)					    AOLserver Built-In Commands 				      ns_crypt(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_crypt - commands SYNOPSIS
ns_crypt key salt _________________________________________________________________ DESCRIPTION
ns_crypt encrypted the key, also known as the password, using the salt and returns the result. It uses the same algorithm as the unix crypt command. The result from ns_crypt is a 13-character string. The first two characters correspond to the salt, and the remaining eleven characters correspond to the password encrypted with the specified salt. The password is a string (typically that of a password to be used for nscp and/or nsperm authentication). salt should be two characters, typically from the set [a-zA-Z0-9./]. If the empty string is specified as the salt then ns_crypt returns the empty string. If a string longer than two characters is specified for the salt it is truncated to two characters. If a one character salt is provided the output will appear to have a two-character salt (the single character repeated), however, the encrypted value does not correspond to the same password being encrypted with the equivalent two character salt. (As a result sticking with a two character salt is highly recommended.) Input to ns_crypt is case-sensitive. EXAMPLES
nscp> ns_crypt aolserver ns ns0WvClsyIL4A nscp> ns_crypt aolserver NS NSDQ1dPM.409Q nscp> ns_crypt aolserver tcl tcAbgtlzbEhVc nscp> ns_crypt aolserver tc tcAbgtlzbEhVc nscp> ns_crypt aolserver .. ..7TNvXHLxJ9Y nscp> ns_crypt aolserver . ..fwmBaZuzrRs SEE ALSO
nsd(1), info(n), nscp, nsperm, crypt(3) KEYWORDS
AOLserver 4.0 ns_crypt(3aolserver)
Man Page