Updated: October 28, 2024 |
This file stores information about users.
Each line in /etc/passwd is in this format:
username:has_pw:userid:group:comment:homedir:shell
The fields are separated by colons and include:
This field must be empty or x. If x, the user's hashed password is in /etc/shadow.
It's not recommended to leave it empty, as it means one of two things, depending on options given to other components: a password is not required to authenticate, or you cannot successfully authenticate.
If the pam_qnx.so PAM module is used for authentication, then it's necessary to use the nullok option for it to permit authentication without a password. Without this option, any attempt to authenticate is disallowed. If nullok is used, authentication when using login or su is permitted without a password. In the case of ssh, the use of nullok with pam_qnx.so is insufficient. You must also set the sshd config option PermitEmptyPasswords to yes.
Here's a sample entry from /etc/passwd:
fred:x:290:120:Fred L. Jones:/home/fred:/bin/sh