User provisioning Files: 1 User information file/etc/passwd 2 Shadow file/etc/shadow 3 Group information file/etc/group
4 set of password files/etc/gshadow
1 User Information file/etc/passwd
- User name
- Password flag (x means the user has a password, the password is mapped to the/etc/shadow file,)
- UID (User ID) (0: Super User 1-499: System User (System user also called pseudo user, used to start command, cannot log on and delete) 500-65535: normal user)
- GID (user initial group ID)
- User Description
- Home directory (normal User:/home/user name Super User:/root)
- The shell after login
Initial group: Refers to a group that a user has built on. Each user has only one initial group
[[email protected] ~]# cat/etc/passwd root:x:0:0:root:/root:/bin/bash Super User, with password, uid 0,gid for 0 Bin:x:1: 1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin pseudo-user sbin:/ SBIN/SHUTDOWNSTACK:/VAR/RUN/AVAHI-DAEMON:/SBIN/NOLOGINTCPDUMP:X:72:72::/:/SBIN/NOLOGINSSHD:X:74:74: privilege-separated ssh:/var/empty/sshd:/sbin/nologinoprofile:x:16:16:special user account to being used by OProfile:/ Home/oprofile:/sbin/nologinChenna:x:500:500::/home/chenna:/bin/bash General user chenkai:x:501:502::/home/ Chenkai:/bin/bash
You can change the UID of the configuration file to 0 instead of the normal user becomes superuser.
2 Shadow File/etc/shadow
- User name
- encryption password (!! or * means no password, no login For example, the pseudo-user is * or!! )
- Password Last modified
- Two-time password modification interval
- password validity period (changed to n days, is to force the user to change the password every n days)
- The number of days before password modification expires
- Grace days after password expires (0: Expires immediately after password expiration -1: Indicates that the password will not expire permanently )
- account Expiration Time
- reserved
[Email protected] ~]# Cat/etc/shadowroot:$$9psq/qiicntcgyce$9wag77jc2ljk1pgpddi1lsxjlyuyoggzyaind8z4ewcp/ MLHVW
/ur/n8d7if1uvvkiwshwfr3ijuqepigajv2/:17357:0:90:7:5::
Super User
Bin:*:15513:0:99999:7:::sshd:!! : 17357: .:::: oprofile:!! : 17357::::::
Pseudo user
Chenna:$6$ijk6ovcc$itrmzztt.nek5ahhffszyighdfoqblls2pacmbxjvzcwce.dak3osfadf8
G7dke0azz9xo5ihaql2vszrnplg/:17357:0:99999:7:::
Normal User
You can modify this profile by adding the password before encrypting it! Disable the password, you can lock the user
3 Set of information files/etc/group
- Group name
- Group password flag (→/etc/gshadow)
- Gid
- Additional users in the group
sshd:x:74:oprofile:x:16:slocate:x:21:chenna:x:500:brother:x:501:chenkai:x:502:
3 Set of password files/etc/gshadow
- Group name
- Group password
- Group Administrator user Name
- Group Attach User
sshd:!::oprofile:!::slocate:!::chenna:!::brother:!::chenkai:!::
Linux-User Profiles