1. user File: etcpasswd [root @ pinfun6 ~] Catetcpasswdroot: x: 0:
1. user File:/etc/passwd
[Root @ pinfun6 ~] # Cat/etc/passwdroot: x: 0: 0: root:/root: /bin/bash 1 2 3 4 5 6 7 | -- the default SHELL used by the user ||||| | -- the user's home directory | -- user finger information (Comment Information) | -- user group ID (GID) | -- user ID (UID) | -- password placeholder (the password is saved in the/etc/shadow file) | -- user name
Add user command: useradd [option]... This file is operated by USERNAME.
The default/home/USERNAME Directory of the new user is stored in the/etc/skel directory.
II. user password file:/etc/shadow
[Root @ pinfun6 ~] # Cat/etc/shadowroot: $1 $. TZS2yur $ uQ3.5XLbdEhLkak9HKqZx/: 16042: 0: 99999: 7: Blank 1 2 3 4 5 6 7 8 9 |||||| -- reserved field, currently blank | -- User Expiration Date (unit/day). This field specifies the number of days the user has expired (from January 1, to the present) | -- how many days after the password expires to disable this user | -- how many days in advance to warn that the user password will expire |||| -- twice the maximum number of days for password modification ||||-- the minimum interval between two password modifications |||-- the last password change time (unit/day ), days from January 1, January 01, 1970 to the present | -- user password (corresponding to the password placeholder in the/etc/passwd file), if the password is added "!"" Indicates disabling this user | -- user name (corresponding to the user name in the/etc/passwd file) Note: When the values of fields 4, 5, 6, 7, and 8 are empty, the account can be used permanently.
Set user password command: passwd [option]... USERNAME operation is this file.
3. user group File:/etc/group
[Root @ pinfun6 ~] # Cat/etc/grouproot: x: 0: root | -- additional groups (multiple groups can be separated by commas (,) | -- Group ID (GID) | -- Group password placeholder | -- group name
Add Group Command: groupadd [option]... GROUPNAME
II. user group File:/etc/gshadow
[Root @ pinfun6 ~] # Cat/etc/gshadowroot: Blank: blank: root | -- group members separated by commas | -- group administrators separated by commas | -- encrypted password | -- group name