创建多个用户组和用户,设置候选组,默认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.
本文出自 “Yolo” 博客,请务必保留此出处http://4708948.blog.51cto.com/4698948/1701858
rhel7 创建多个用户组和用户,设置候选组,默认shell
原文地址:http://4708948.blog.51cto.com/4698948/1701858