Part 1
1.创建用户gentoo,附加组为bin和root,默认shell为/bin/csh,注释信息为"Gentoo Distribution"
[root@kezai ~]
[root@kezai ~]
uid=1007(gentoo) gid=1008(gentoo) groups=1008(gentoo),0(root),1(bin)
[root@kezai ~]
gentoo:x:1007:1008:Gentoo Distribution:/home/gentoo:/bin/csh
2. 创建下面的用户、组和组成员关系。名字为webs的组。用户nginx,使用webs 作为附加组,用户varnish,使用webs 作为附加组。用户mysql,不可交互登录系统,且不是webs 的成员,nginx,varnish,mysql密码都是123456
[root@kezai ~]
[root@kezai ~]
webs:x:1009:
[root@kezai ~]
[root@kezai ~]
[root@kezai ~]
nginx:x:1008:1010::/home/nginx:/bin/bash
[root@kezai ~]
varnish:x:1009:1011::/home/varnish:/bin/bash
[root@kezai ~]
[[root@kezai ~]
mysql:x:1010:1012::/home/mysql:/sbin/nologin
[root@kezai ~]
Changing password for user nginx.
passwd: all authentication tokens updated successfully.
[root@kezai ~]
Changing password for user varnish.
passwd: all authentication tokens updated successfully.
[root@kezai ~]
Changing password for user mysql.
passwd: all authentication tokens updated successfully.
[root@kezai ~]
nginx varnish
3.将用户nginx从附加组webs删除,并添加用户xiaoqiang到webs附加组
[root@kezai ~]
[root@kezai ~]