1 /etc/passwd 7 sessions,using ":":
1)user name
2)x(password)
3)uid:user identity
4)gid:groud identity
5)comment
6)user home directory
eg:root->/root
eg:common user ->/home/username
7)shell: a user reboot a process after login.the shell pass
the commad to kernel.like sh,csh,ksh,tcsh,bash...
2 /etc/shadow 9 sessions,using ":"
1)user name
2)password
3)last time when changed password
5)days left when password outdate
4)days left for changing password(0 day default)
6)days left for warning when password outdates
7)days when counter can't work
8)counter life period
9)reserved
3 add/cancel a user/group
eg:groupadd/gropuel ...groupname
eg:useradd/userdel ...username
eg:chfn (when change user's finger)
4 establish/modify a username
eg:passwd [username]
5 sometimes users cannot doing some stuff unless the root user.
so,he/she should change into the root user.the command as follows
eg:su -
And you can use "echo $LOGNAME" to find out current username.
eg:su [-] username
6 for safe,"sudo" command should be introduced while su - may be
dangerous if the password of root uncoverd
if you are only a commond user and you alse want to use "sudo",
then you can use "visudo" instead.but make sure you download
the special packet,using "yum install -y sudo"
7 here,you should add "test ALL=(ALL)ALL"below "root
ALL=(ALL)ALL in the file(default).
but for convenience,you make a group admittet,then add all user
into this group
1)user name
2)x(password)
3)uid:user identity
4)gid:groud identity
5)comment
6)user home directory
eg:root->/root
eg:common user ->/home/username
7)shell: a user reboot a process after login.the shell pass
the commad to kernel.like sh,csh,ksh,tcsh,bash...
2 /etc/shadow 9 sessions,using ":"
1)user name
2)password
3)last time when changed password
5)days left when password outdate
4)days left for changing password(0 day default)
6)days left for warning when password outdates
7)days when counter can't work
8)counter life period
9)reserved
3 add/cancel a user/group
eg:groupadd/gropuel ...groupname
eg:useradd/userdel ...username
eg:chfn (when change user's finger)
4 establish/modify a username
eg:passwd [username]
5 sometimes users cannot doing some stuff unless the root user.
so,he/she should change into the root user.the command as follows
eg:su -
And you can use "echo $LOGNAME" to find out current username.
eg:su [-] username
6 for safe,"sudo" command should be introduced while su - may be
dangerous if the password of root uncoverd
if you are only a commond user and you alse want to use "sudo",
then you can use "visudo" instead.but make sure you download
the special packet,using "yum install -y sudo"
7 here,you should add "test ALL=(ALL)ALL"below "root
ALL=(ALL)ALL in the file(default).
but for convenience,you make a group admittet,then add all user
into this group