/etc/passwd a row of records corresponds to one user, each row is separated by a colon (delimited by 7 fields, with the following format and specific meanings:
Username: Password: User identification number: Group ID: Annotation Description: Home directory: Login Shell
1 "username" is a string representing the user account. Typically no longer than 8 characters long and consist of uppercase and lowercase letters and/or numbers. You cannot have a colon in the login name, because the colon is a separator here. For compatibility purposes, it is best not to include the dot character (.) in the login name and start with a hyphen (-) and a plus sign (+).
2 "password" in some systems, stored in the encrypted user password Word. This is a security risk because the/etc/passwd file is readable by all users, although the field stores only the encrypted string of user passwords, not plaintext. As a result, many Linux systems (such as SVR4) now use the shadow technology to store the true encrypted user password in a/etc/shadow file, and only one special character, such as "X" or "*", is stored in the password field of the/etc/passwd file.
3 "User ID" is an integer that is used internally by the system to identify the user. In general, it corresponds to a username of one by one. If several user names correspond to the same user ID, they will be treated as the same user within the system, but they can have different passwords, different home directories, and different login shells.
Typically, the user identification number is 0~65 535. 0 is the identification number of Superuser root, 1~99 is reserved by the system, and as an administrative account, the average user's identification number begins at 100. In a Linux system, the limit is 500.
4 The Group Identification Number field records the user group to which the user belongs. It corresponds to a record in the/etc/group file.
5 "Annotated description" field records some of the user's personal situation, such as the user's real name, telephone, address, etc., this field does not have any practical uses. In different Linux systems, the format of this field is not uniform. In many Linux systems, this field holds an arbitrary annotated descriptive text that is used as the output of the finger command.
6 "Home Directory" is the user's starting working directory, which is the user's directory after logging into the system. In most systems, the user's home directory is organized under the same specific directory, and the user's home directory name is the user's login name. Each user has read, write, execute (search) permissions on his or her home directory, and other users ' access to the directory is set according to the specific circumstances.
7 User login, to start a process, responsible for the user's operation to the kernel, this process is the user log into the system after the operation of the command interpreter or a specific program, that is, Shell. The Shell is the interface between the user and the Linux system. There are many kinds of Linux shells, each of which has different characteristics. Commonly used are sh (Bourne shell), csh (c shell), Ksh (Korn Shell), tcsh (tenex/tops-20 type C shell), bash (Bourne Again shell), and so on. System administrators can specify a shell for the user based on system conditions and user habits. If you do not specify a shell, then the system uses SH as the default login shell, that is, the value of this field is/bin/sh.
The user's login shell can also be specified as a specific program (this program is not a command interpreter). With this feature, we can limit the user to running only the specified application, and the user will automatically exit the system after the application has finished running. Some Linux systems require only those programs that are registered in the system to appear in this field.
# cat/etc/group
Group name: encrypted password: Group ID: All users belonging to the group.