Chinaunix首页 | 论坛 | 博客
  • 博客访问: 687054
  • 博文数量: 191
  • 博客积分: 10987
  • 博客等级: 上将
  • 技术积分: 1925
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-22 09:52
文章分类

全部博文(191)

文章存档

2014年(10)

2011年(11)

2010年(38)

2009年(132)

分类: LINUX

2009-10-09 10:42:00

摘录自鸟哥的文档,可以尝试一下不使用useradd的方式添加一个用户:
如下:
    1. 先建立所需要的群组( vi /etc/group
    2. 建立账号的各个属性( vi /etc/passwd
    3. passwd shadow 同步化 ( pwconv
    4. 建立该账号的密码 ( passwd acount
    5. 建立使用者家目录 ( 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 updated successfully

建立家目录并转化家目录的拥有者
[root @test /root ]# cp -r /etc/skel /home/test
[root @test /root ]# chown -R test:test /home/test

 
OK。
 
阅读(1121) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-10-10 18:10:02

大连娇娇上门按摩13761689698,13391266868, www.shanghaimassage.cn 全天24小时为您提供大连市区上门按摩服务,为追求健康与美好生活的您送去真诚与温暖。 A.中医推拿 90分钟260 B.欧式油压 90分钟260 C.泰式按摩 90分钟260 D.柔胸粉推 90分钟300 E. 前列腺保养90分钟300 F.丝丝情侣 90分钟300 G. 至尊享受 90分钟500 H.激情演绎 90分钟600 I.后庭诱惑 90分钟1200 J.双凤嬉龙 90分钟1000 项目多多都可体验: A. B. C. D. E. F,可任选3项 价格90分钟260. 以上服务需另支付往返出租车费,无其它额外费用。 QQ:191937218 预约热线:137-6168-9698/ 133-9126-6868 公司网址:www.shanghaimassage.cn 邮箱:shanghai