您好,登錄后才能下訂單哦!
修改用戶密碼時提示如下報錯:
passwd: Authentication token manipulation error
解決辦法
檢查/etc/pam.d/passwd、/etc/pam.d/system-auth以下配置是否存在:
1、cat /etc/pam.d/passwd
#%PAM-1.0 auth required pam_stack.so service=system-auth account required pam_stack.so service=system-auth password required pam_stack.so service=system-auth password required pam_cracklib.so dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1 minlen=6 password required pam_unix.so use_authtok nullok md5 password required pam_unix.so remember=5 use_authtok 最后這三行有些老系統不支持,設置后也會導致上面的報錯 |
2、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 /lib/security/$ISA/pam_env.so auth sufficient /lib/security/$ISA/pam_unix.so likeauth nullok auth required /lib/security/$ISA/pam_deny.so account required /lib/security/$ISA/pam_unix.so account sufficient /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet account required /lib/security/$ISA/pam_permit.so password requisite /lib/security/$ISA/pam_cracklib.so retry=3 password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow password required /lib/security/$ISA/pam_deny.so session required /lib/security/$ISA/pam_limits.so session required /lib/security/$ISA/pam_unix.so |
3、也可以直接修改shadow文件密碼串
方法一)
perl -e 'print crypt("password","\$1\$2BDxrkQc\$"),"\n"'
注:這里的2BDxrkQc,是shadow中salt($3)的內容,如果要隨機生成salt,可使用方法二。
方法二)
echo "password" | openssl passwd -1 -salt $(< /dev/urandom tr -dc '[:alnum:]' | head -c 32) -stdin
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。