linux user and group

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值