1, Linux system, the user is divided into three kinds: super users, System users, ordinary users; Each user has their own UID, the UID of the superuser is 0; the system user refers to the service or software on which the system is running, and the system user's ID range is 1~ 499. Ordinary users are all real users who use Linux, they will be strictly assigned permissions, the range of IDs starts from 500;
2, each user will have an initial group, and can join more than one additional group, through the command can view some information of the currently logged on user:
[[email protected] ~]# ID # confirm your uiduid=0(root) gid=0(root) group =0(Root) environment =unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[Email protected] ~]# Groups # Identify your group
Root
[Email protected] ~]# who # View Current online users
root tty1 -About: (: 0) Root pts/1 -£º ( 192.168. 100.1)
3, the user information basic configuration file:/etc/passwd,/etc/shadow, wherein passwd is the user basic information configuration file, shadow stores the user's password, and only the root user has the Read permission;
Each row in the passwd file represents a user, and each user has seven fields that explain the fields:
1> user name, play the role of logo in Linux;
2> password, x means the password is stored;
3> The UID of the user;
4> user's GID;
5> user's notes;
6> user's home directory;
7> the shell used by the user after login;
User and user group management for Linux