1.創建組distro,其GID為2016
[root@localhost ~]# groupadd -g 2016 distro
2.創建用戶mandriva,其ID號為1005;基本組為distro
[root@localhost ~]# useradd -u 1005 mandriva -g 2016
3.創建用戶mageia,其ID號為1100,家目錄為/home/linux;
[root@localhost linux]# useradd -d /home/linux/ -u 1100 mageia
4.給用戶mageia添加密碼,密碼為mageedu;
[root@localhost ~]# passwd mageia
Changing password for user mageia.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
5.刪除mandriva,但保留其家目錄;
[root@localhost ~]# userdel mandriva
6.創建用戶slackware,其id號為2002,基本組為distro,附加組peguin;
[root@localhost ~]# useradd -u 2002 -g distro -G peguin slackware
7.修改slackware的默認shell為/bin/tcsh;
usermod -s /bin/tcsh slackware
8.為用戶slackware新增加附加組admins;
usermod -G admins,peguin slackware
原創文章,作者:469008940,如若轉載,請注明出處:http://www.www58058.com/86258