What is the /etc/passwd file used for?

Tim Rohaly

/etc/passwd is the file that hold the user names and passwords for all TINI users. By default there are two accounts: "root" with a password of "tini", and "guest" with a password of "guest". You may modify the contents of this file by hand, or by using the passwd command in slush. Slush also provides the useradd and userdel commands to add and remove password file entries.

The default password file is shown below:

Each field in the password file is separated by a colon (:). The first field is the user name, the second is a hash of the password, and the third is the user ID, or UID.

Note that /etc/passwd must have read permission for "other" in order to be usable. Executing ls -l /etc/passwd should show a file permission of -rwxr--.