手动添加用户步骤Linux认证考试

文章作者 100test 发表时间 2009:10:16 21:33:02
来源 100Test.Com百考试题网


  摘录自鸟哥的文档,可以尝试一下不使用useradd的方式添加一个用户:

  如下:

  先建立所需要的群组(vi /etc/group)

  建立账号的各个属性(vi /etc/passwd)

  将passwd与shadow同步化(pwconv)

  建立该账号的密码(passwd acount)

  建立使用者家目录(cp -r /etc/skel /home/account)

  6. 更改家目录属性 ( chown -R account.group /home/account )

  建立新的群组 test ,设其 GID 为 520

  [root @test /root ]# vi /etc/group

  ----略

  test:x:520:test   <.==新增群组,且群组的人为 test ,GID 为 520

  建立test的各个属性

  [root @test /root ]# vi /etc/passwd

  ----略

  test:x:520:520:testing account:/home/test:/bin/bash <.==建立各个属性

  同步化/etc/passwd与/etc/shadow

  建立新的群组 test ,设其 GID 为 520

  [root @test /root ]# vi /etc/group

  ----略

  test:x:520:test   <.==新增群组,且群组的人为 test ,GID 为 520

  建立test的各个属性

  [root @test /root ]# vi /etc/passwd

  ----略

  test:x:520:520:testing account:/home/test:/bin/bash <.==建立各个属性

  同步化/etc/passwd与/etc/shadow

  [root @test /root ]# pwconv   <.==将 passwd 的资料转入 /etc/shadow 中!

  建立密码

  [root @test /root ]# passwd test <.==建立使用者test密码

  Changing password for user test

  New password:

  Retype new password:

  passwd: all authentication tokens 0updated successfully

  建立家目录并转化家目录的拥有者

  [root @test /root ]# cp -r /etc/skel /home/test

  [root @test /root ]# chown -R test:test /home/test

  OK。



相关文章


Linux的文件属性与目录配置Linux认证考试
linux认证辅导:linux系统优化Linux认证考试
Linux内核SCSIIO子系统分析Linux认证考试
详解Linux操作系统下防火墙设置方法Linux认证考试
手动添加用户步骤Linux认证考试
linux认证辅导:linux下的yumLinux认证考试
Linux系统信息查看命令Linux认证考试
如何让Firefox优化得比Chrome更快Linux认证考试
Linux桌面用户占有率为何逐月下降?Linux认证考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛