useradd 无法打开密码文件
2011-07-19 23:54
155 查看
老问题了,以前在某论坛写过帖子,但是找不到了,现在记在这。。。。
造成这个现象的原因是/etc/passwd文件的ext2文件属性被修改(但即便是在ext3系统中,这个属性也有效果。目前还没在ext4文件系统中测试)。使用lsattr可以查看该文件的属性:
造成这个现象的原因是/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无法打开密码文件
- 当程序用ado的jet4.0方式连接的时候,对于设有access数据库密码的mdb的访问居然报错“无法启动应用程序,工作组信息文件丢失,或是已被其他用户已独占方式打开”,而用odbc方式不报错,小阴沟里翻船,郁闷中然后查文档解决之
- (转)连接带有密码的ACCESS数据库时出现“无法启动应用程序。工作组信息文件丢失,或是已被其它用户以独占方式打开”的解决方法
- 连接带有密码的ACCESS数据库时出现“无法启动应用程序。工作组信息文件丢失,或是已被其它用户以独占方式打开”的解决方法
- (有密码Access)Access无法启动应用程序,工作组信息文件丢失,或是已被其他用户已独占方式打开
- [C#]连接带有密码的ACCESS数据库时出现“无法启动应用程序。工作组信息文件丢失,或是已被其它用户以独占方式打开”的解决方法
- userdel:无法打开密码文件
- 当程序用ado的jet4.0方式连接的时候,对于设有access数据库密码的mdb的访问居然报错“无法启动应用程序,工作组信息文件丢失,或是已被其他用户已独占方式打开”,而用odbc方式不报错,小阴沟里翻船,郁闷中然后查文档解决之
- 当程序用ado的jet4.0方式连接的时候,对于设有access数据库密码的mdb的访问居然报错“无法启动应用程序,工作组信息文件丢失,或是已被其他用户已独占方式打开”,而用odbc方式不报错,小阴沟里翻船,郁闷中然后查文档解决之
- IIS 学习笔记(在IIS上发布了一个webservice,访问时可以访问到其目录,但是无法打开.asmx文件)
- OSG学习之示例遇到的问题三无法打开文件osgGA/MatrixManipulator错误
- 错误 3 error C1083: 无法打开包括文件: “D3Dx9.h”: No such file or directory d:\qipai\netfox\系统模块更正\系统模块\客户端组件\游
- fatal error LNK1104: 无法打开文件“LIBC.lib”错误
- Microsoft.Office.Access数据库引擎无法打开文件
- Cocos2d-x 3.x 中解决 无法打开包括文件:“json/document.h”: No such file or directory 的问题
- fatal error C1083: 无法打开包括文件:“iostream.h”: No such file or directory
- fatal error C1083: 无法打开包括文件:“fstream.h”的解决
- 解决“fatal error c1803 无法打开包括文件”问题
- vs2003.net报“无法打开Web项目文件路径与URL不符。这两者需要映射到相同的服务器”问题