rhel7 创建多个用户组和用户,设置候选组,默认shell

创建多个用户组和用户,设置候选组,默认shell

groupadd -g 40000 adminuser  指定gid

useradd natasha -G adminuser  指定附属组

[root@desktop0 /]# useradd harry -Gadminuser

[root@desktop0 /]# useradd sarah -s/bin/nologin

[root@desktop0 /]# echo"glegunge" | passwd --stdin natasha 指定密码

Changing password for user natasha.

passwd: all authentication tokens updatedsuccessfully.

[root@desktop0 /]# echo"glegunge" | passwd --stdin harry

Changing password for user harry.

passwd: all authentication tokens updatedsuccessfully.

[root@desktop0 /]# echo"glegunge" | passwd --stdin sarah

Changing password for user sarah.

passwd: all authentication tokens updatedsuccessfully.


      本文转自810105851 51CTO博客,原文链接:http://blog.51cto.com/4708948/1701858,如需转载请自行联系原作者


你可能感兴趣的:(rhel7 创建多个用户组和用户,设置候选组,默认shell)