useradd 无法打开密码文件
来源:互联网 发布:咫尺网络微页下载 编辑:程序博客网 时间:2024/04/28 01:47
老问题了,以前在某论坛写过帖子,但是找不到了,现在记在这。。。。
造成这个现象的原因是/etc/passwd文件的ext2文件属性被修改(但即便是在ext3系统中,这个属性也有效果。目前还没在ext4文件系统中测试)。使用lsattr可以查看该文件的属性:
[root@RHEL ~]# lsattr /etc/passwd----i-------- /etc/passwd
该文件被设置了"i"属性,该属性指定当前文件不可被修改,在手册中对此属性的描述为(man chattr):
A file with the ‘i’ attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
使用chattr去掉相关文件的"i"属性(我的系统中,/etc/shadow也被设置了"i"属性):
[root@RHEL ~]# chattr -i /etc/passwd[root@RHEL ~]# chattr -i /etc/shadow
这样,就可以添加用户了。另外,虽然不知道是谁,或者哪个程序设置了"i"属性,但是此属性对系统安全还是有一定用途的,建议添加用户后将文件的"i"属性再设置上。
- useradd 无法打开密码文件
- useradd 无法打开密码文件
- useradd无法打开密码文件
- useradd 无法打开 /etc/passwd
- userdel:无法打开密码文件
- 无法打开chm文件
- chm文件无法打开
- exe文件无法打开
- 无法打开文件“.lib”
- Xcode只能打开文件,无法打开工程
- Xcode只能打开文件,无法打开工程
- VC6无法打开文件问题解决
- 无法打开chm文件解决方法
- VC6无法打开文件问题解决
- 无法打开文件 mfcn42d.lib
- SP2-0310: 无法打开文件
- 无法打开某个CHM文件
- 无法打开chm文件怎么办?
- 用C#做波形图特效,简洁地说就是做波浪线
- POJ 1008 Maya Calendar
- memcpy memset strcpy
- 史上最全的vSphere命令—用命令来操作vSpherer
- 如何得到Oracle数据库中的所有表空间?
- useradd 无法打开密码文件
- javascript学习笔记(5)
- ping程序实现
- POJ 1068 Parencodings
- Android 客户端通过内置API(HttpClient) 访问 服务器(用Spring MVC 架构) 返回的json数据全过程
- Flex 4在组件外部重设已在skin class内设置的样式
- 6月19,观世音菩萨成道
- POJ 1298 The Hardest Problem Ever
- Flex 4在多状态(State)下使用事件(如click等)要特别注意