帮助中心 >  技术知识库 >  云服务器 >  服务器教程 >  centos修改root密码passwd: Authentication token manipulation error

centos修改root密码passwd: Authentication token manipulation error

2016-06-01 14:18:32 8827

修改密码时提示错误
[root@WS10111509 ~]# passwd root
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error

2,修改权限时提示错误
[root@WS10111509 ~]# chmod 755 /etc/passwd
chmod: changing permissions of `/etc/passwd’: Operation not permitted

3,同步/etc/passwd 和/etc/shadow出错
#pwconv
pwconv: can’t lock passwd file

4,操做方法。
检查:
# fuser -u /etc/passwd //查看是否有写入权限
# lsof |grep passwd //查看是否有写入权限
# ll /etc/.pwd.lock //查看是否有此文件
# df -i //查看是否空间被占满
# lsattr /etc/shawr //查看是否被写保护

lsattr /etc/passwd
—i———- //被标记了i属性

chattr -i /etc/passwd
chmod 755 /etc/passwd

lsattr /etc/shawr
—-i——– //被标记了i属性

chattr -i /etc/shaw
chmod 755 /etc/shaw

#pwconv 同步/etc/passwd 和/etc/shadow

pawsswd root 不会出错了。修改密码后

5,加回保护

#chattr命令只能管理员使用,重新保护passwd文件
chattr +i /etc/passwd
chattr +i /etc/shaw

 

还有一种可能就是有的系统是限制了5天内不能修改密码,也会出现这样的错误。


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: