Chinaunix

标题: 如何在linux添加用户,修改密码,查看用户? [打印本页]

作者: dcdong    时间: 2009-11-05 16:11
标题: 如何在linux添加用户,修改密码,查看用户?
要让Linux能用起来,首先的是要给客户一个可用的名字,密码。下面描述了过程

[root@localhost ~]# useradd caren   //添加一个一个caren的用户名
[root@localhost ~]# passwd caren    //修改caren的密码
Changing password for user caren.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# cd /etc         //切换到etc目录下
[root@localhost etc]# more passwd   //查看新用户是否生成
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
......
pegasus:x:66:65:tog-pegasus OpenPegasus WBEM/CIM services:/var/lib/Pegasus:/sbin/nologin
caren:x:501:501::/home/caren:/bin/bash   //新用户添加成功
[root@localhost etc]#

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/105400/showart_2087118.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2