常见系统文件介绍,如/etc/passwd

1./etc/passwd文件是用户管理工作涉及的最重要的一个文件。
2./etc/shadow文件是 把加密后的口令字分离出来,
3./etc/group 用户组的所有信息都存放在/etc/group文件中。

1./etc/passwd  

Linux系统中的每个用户都在/etc/passwd文件中有一个对应的记录行,它记录了这个用户的一些基本属性。
这个文件对所有用户都是可读的。它的内容类似下面的例子:


# cat /etc/passwd
root:x:0:0:Superuser:/:
daemon:x:1:1:System daemons:/etc:
bin:x:2:2:Owner of system commands:/bin:
sys:x:3:3:Owner of system files:/usr/sys:
adm:x:4:4:System accounting:/usr/adm:
uucp:x:5:5:UUCP administrator:/usr/lib/uucp:
auth:x:7:21:Authentication administrator:/tcb/files/auth:
cron:x:9:16:Cron daemon:/usr/spool/cron:
listen:x:37:4:Network daemon:/usr/net/nls:
lp   :x   :71      :18     :Printer   administrator    :/usr/spool/lp:
用户名:口令:用户标识号:组标识号:注释性描述:主目录:             登录Shell

2./etc/shadow

/etc/shadow中的记录行与/etc/passwd中的一一对应,它由pwconv命令根据/etc/passwd中的数据自动产生
它的文件格式与/etc/passwd类似,由若干个字段组成,字段之间用":"隔开。这些字段是:
登录名:加密口令:最后一次修改时间:最小时间间隔:最大时间间隔:警告时间:不活动时间:失效时间:标志
![在这里插入图片描述](https://www.icode9.com/i/ll/?i=12f96b7ac85840ec9645a7ee9d7b0882.png#pic_center)




上一篇:Syntax Error: TypeError: this.getOptions is not a function


下一篇:使用gulp构建项目,sass/less编译,js/css/html/image压缩,版本号处理