版權聲明:本文為博主原創文章,支持原創,轉載請附上原文出處鏈接和本聲明。
本文地址:https://www.cnblogs.com/wannengachao/p/12069113.html
1、設置新密碼,第二次輸入相同密碼驗證報錯
報錯如下:
[root@node1~]# passwd test
Changing password for user test.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: Authentication token manipulation error
排查文件是否被上鎖:(我的報錯就是因為文件被上i鎖導致文件)
命令 lsattr 文件名
## 如下圖排查發現文件被上了i鎖
解決:
chattr -i 文件名
解鎖后並驗證,查看 i 鎖取消后再次修改密碼即可
磁盤滿了,或者inode滿了,也會導致出現此種錯誤,通過df -h與df -i 查看
2、設置新密碼第一次輸入就報錯
[root@node1 ~]# passwd test
Changing password for user test .
passwd: Authentication token manipulation error
You have new mail in /var/spool/mail/root
排查:/etc/pam.d/ 是否正常,下圖為正常內容,文件內容不正常也會引起此報錯(例如有個注釋之類的)
可與下方正常內容進行對比排查。##僅供參考
解決:
將錯誤地方修改為正常狀態即可。
排查2:
/etc/pam.d/system-auth 文件內容是否正常,可與下方正常內容進行對比排查。##僅供參考
[root@kelong1 shi]# cat /etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_faildelay.so delay=2000000
auth sufficient pam_fprintd.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
account required pam_permit.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so