1.创建组distro,其GID为2019
groupadd -g 2019 distro

2.创建用户mandriva, 其ID号为1005;基本组为distro

useradd mandriva -u 1005 -g distro
3.创建用户mageia,其ID号为1100,家目录为/home/linux
useradd -u 1100 -d /home/linux mageia

4.给用户mageia添加密码,密码为mageedu,并设置用户密码7天后过期
passwd mageia
Changing password for user mageia.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

5.删除mandriva,但保留其家目录
 userdel mandriv

6.创建用户slackware,其ID号为2002,基本组为distro,附加组peguin

1)groupadd peguin

2)useradd slackware -u 2002 -g distro -G peguin

7.修改slackware的默认shell为/bin/tcsh

 chsh slackware
Changing shell for slackware.
New shell [/bin/bash]: /bin/tcsh
Shell changed.

8.为用户slackware新增附加组admins

 usermod -aG admins slackware

相关文章:

  • 2022-12-23
  • 2021-05-19
  • 2021-04-24
  • 2022-02-09
  • 2022-12-23
  • 2021-11-25
  • 2021-11-03
猜你喜欢
  • 2022-12-23
  • 2022-01-02
  • 2022-02-09
  • 2021-12-05
  • 2021-08-04
相关资源
相似解决方案