The/etc/passwd file is a plain text file with the same format for each line:
Name:password:uid:gid:comment:home:shell
They have the following meanings:
Domain |
Description |
Name |
User Login Name |
Password |
User password. The password in this domain is encrypted. When the user logs on to the system, the system takes the same algorithm for the password entered and compares it with the content in this domain. If this field is blank, the user does not need a password to log on. |
Uid |
Specifies the user's UID . After the user logs into the system, the system identifies the user by this value, not the user name. |
Gid |
GID . This value is used if the system is to give the same rights to the same group of people. |
Comment |
Used to save the user's real name and personal details. |
Home |
Specifies the absolute path of the user's home directory. |
Shell |
If the user logs on successfully, the absolute path of the command to execute is placed in this area. It can be any command. |