One, user profile and password configuration file
/bin/bash can log in
/sbin/nologin even if you set a password or can't log in
Etc/shawow and ETC/PASSWD are similar
Second, user group management
Groupadd Add Group
You can also specify the ID of the group
Groupadd-g 1005 Grp2 (centos7 above increase group needs more than 1000, 1000 within the system reservation, CENTOS6 500 or more) to specify GID
Groupdel Deleting a group
Groupdel GRP2
Tail-n1/etc/group View (number indicates a few lines)
The premise of removing 1 groups is that there are no users in the user who will be prompted not to delete
etc/shadow-//etc/passwd/etc/gshadow-/file behind the belt-, the system automatically for our backup, accidentally deleted, can be copied back, there may be new users are not updated in a timely manner.
Third, user management
Useradd adding users
Useradd-u 1006-g grp1-d/home/yylinux111-s/sbin/nologin user4 Specify user uid GID and home directory
Useradd-m User5 Create a user without creating a user's home directory
Userdel Deleting a user
The AddUser useradd effect is consistent.
Iv. usermod Command
Change Properties Command Usermod
Usermod-u 111 username
Usermod-g GID username
user-d/HOME/SADASDASD username
Usermod-s/sbin.nologin username
Usermod-g Grp2 (-G = Expansion Group)
Expansion group Delete usermod-g groupname username (remove the user from another user group and add to the specified user group)
User and Group Management