passwd

From Wikipedia, the free encyclopedia

passwd is a tool on most Unix and Linux systems used to change a user's password. A key derivation function is used to create a hashed version of the new password. Only the hashed version is stored.

The hashed password was originally stored in a local file, usually /etc/passwd, but now more often /etc/shadow (or /etc/master.passwd on BSD systems) when a shadow password mechanism is in use. Most Unix-like operating systems now also allow passwords to be managed via a distributed authentication mechanism such as Sun's NIS, Kerberos, or LDAP, in which case the passwd command will make its changes in the context of the system in use, usually via the appropriate PAM module.

Prior to the advent of PAM, it was necessary to have different commands to change passwords in different authentication schemes. For example, the command to change a NIS password was yppasswd. This required users to be aware of the different methods to change passwords for different systems, and also resulted in wasteful duplication of code in the various programs that performed the same functions with different back ends.

[edit] External links