Create multiple user groups and users, set up candidate groups, default shell
groupadd-g 40000 adminuser specify GID
Useradd natasha-g adminuser Specify a subordinate group
[Email protected]/]# Useradd Harry-gadminuser
[Email protected]/]# Useradd sarah-s/bin/nologin
[Email protected]/]# echo "Glegunge" | passwd--stdin Natasha Specify password
Changing password for user Natasha.
Passwd:all Authentication tokens updatedsuccessfully.
[Email protected]/]# echo "Glegunge" | passwd--stdin Harry
Changing password for user Harry.
Passwd:all Authentication tokens updatedsuccessfully.
[Email protected]/]# echo "Glegunge" | passwd--stdin Sarah
Changing password for user Sarah.
Passwd:all Authentication tokens updatedsuccessfully.
This article is from the "Yolo" blog, make sure to keep this source http://4708948.blog.51cto.com/4698948/1701858
RHEL7 Create multiple user groups and users, set up candidate groups, default shell