手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

RHEL6 修改口令报错passwd: Authentication token manipulation error

[日期:2013-05-31] 来源:Linux社区  作者:hijk139 [字体:大 中 小]

RHEL6修改口令报错passwd: Authentication token manipulation error

原因:和之前的安全加固有关系,通过手工修改/etc/passwd等两个文件的属性即可成功修改密码

备注:chattr 改变文件属性。
i:即Immutable,系统不允许对这个文件进行任何的修改。如果目录具有这个属性,那么任何的进程只能修改目录之下的文件,不允许建立和删除文件

解决问题的方法如下:先修改文件属性为可修改,再改回来,具体如下

[root@linux1 /]# passwd Oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: Authentication token manipulation error
[root@linux1 /]#
[root@linux1 /]#
[root@linux1 /]# ls -l /etc/passwd
-rw-r--r-- 1 root root 1831 May 30 14:24 /etc/passwd
[root@linux1 /]# ls -l /etc/shadow
-rw-r--r-- 1 root root 1430 May 30 15:52 /etc/shadow
[root@linux1 /]# chattr -i /etc/passwd
[root@linux1 /]# chattr -i /etc/shadow
[root@linux1 /]#
[root@linux1 /]#
[root@linux1 /]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@linux1 /]#
[root@linux1 /]#
[root@linux1 /]# chattr +i /etc/shadow
[root@linux1 /]# chattr +i /etc/passwd
[root@linux1 /]#

更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10

linux
相关资讯       RHEL6 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款