题目:
创建下列用户、用户祖,并按要求完成设置: 组名为 sysmgrs
natasha 用户的附属组是 sysmgrs
harry 用户的附属组是 sysmgrs
john 用户的 shell 是非交互式 shell,且不是 sysmgrs 组的成员
natasha、harry、john 的密码是 redhat
做法:
创建下列用户、用户祖,并按要求完成设置: 组名为 sysmgrs
natasha 用户的附属组是 sysmgrs
harry 用户的附属组是 sysmgrs
john 用户的
shell
是非交互式
shell
,且不是
sysmgrs 组的成员

groupadd sysmgrs
useradd -G sysmgrs natasha
useradd -G sysmgrs harry
useradd -s /sbin/nologin john
natasha、harry、john 的密码是 redhat
echo redhat | passwd --stdin natasha
echo redhat | passwd --stdin harry
echo redhat | passwd --stdin john