今天在做用户添加操作时, #useradd test useradd: cannot open shadow password file 刚开始怀疑是/etc/shadow文件权限被误修改,查看/etc/passwd,/etc/shadow属性 [root@mango root]# ls -rlt /etc/passwd -rw-r--r-- 1 root root 1726 4月 20 17:43 /etc/passwd [root@mango root]# ls -rlt /etc/shadow -r-------- 1 root root 1262 4月 20 17:43 /etc/shadow 正常可添加用户的属性如下,没什么区别. ls -rlt /etc/passwd -rw-r--r-- 1 root root 1831 2005-05-09 /etc/passwd [guest@www5 guest]$ ls -rlt /etc/shadow -r-------- 1 root root 1294 2005-05-09 /etc/shadow 尝试将出问题主机的/etc/shadow改成600,结果报错,不让修改! [root@mango root]# chmod 600 /etc/shadow can not modify 问了下安全专员,才知道是做了安全加固,用lsattr和chsttr改变一下属性就可以了! [root@toddy root]#lsattr /etc/shadow ----i-------- /etc/shadow [root@toddy root]# chattr -i /etc/shadow [root@toddy root]# useradd ywg [root@toddy root]# lsattr /etc/passwd
| 【内容导航】 |
| 第1页:Linux系统下添加用户报错信息的处理 | 第2页:Linux系统下添加用户报错信息的处理 |
| 第3页:Linux系统下添加用户报错信息的处理 | |
linux平台支持ntfs文件系统的实现在Ubuntu Feisty Fawn上安装最新的nVIDIA驱动程序和Beryl相关资讯 Linux
- Linux 即将 25 岁:足够伟大 却不 (01月01日)
- Linux 这么棒是因为开源? (08/28/2015 09:21:02)
- FreeBSD 和 Linux 有什么不同? (07/31/2015 09:15:06)
| - 盘点全球“国家级” Linux 项目 (09/25/2015 06:11:28)
- 庆祝 Linux 24 岁生日! (08/26/2015 06:13:36)
- 【观点】离了Linux,我就活不了! (10/31/2013 19:39:56)
|
本文评论 查看全部评论 (0)