[root@localhost ~]# useradd lamp <--添加新用户
[root@localhost ~]# groupadd users <--添加新群组
[root@localhost ~]# usermod -G users lamp <--将用户lamp加入 users群组
[root@localhost ~]# grep "lamp" /etc/passwd /etc/group /etc/gshadow
/etc/passwd:lamp:x:501:501::/home/lamp:/bin/bash
/etc/group:users:x:100:lamp
/etc/group:lamp:x:501:
/etc/gshadow:users:::lamp
/etc/gshadow:lamp:!::
[root@localhost ~]# groups
lamp users
新闻热点
疑难解答