1.创建用户gentoo,附加组为bin和root,默认shell为/bin/csh,注释信息为"Gentoo Distribution"
useradd -s /bin/csh -c "Gentoo Distribution" -G bin, root gentoo
2.创建下面的用户、组和组成员关系
名字为webs 的组
用户nginx,使用webs 作为附加组
用户varnish,使用webs 作为附加组
用户mysql,不可交互登录系统,且不是webs 的成员,nginx,varnish,mysql密码都是magedu.
groupadd webs;
useradd nginx -G webs;
useradd varnish -G webs;
useradd mysql -s /sbin/nologin;
echo magedu |passwd --stdin nginx;
echo magedu |passwd --stdin varnish;
echo magedu |passwd --stdin mysql;