password change failed: Insufficient access

password change failed: Insufficient access

passwd: Authentication token manipulation error

centos修改密码

一开始在自己家目录下执行修改密码操作会报错

password change failed: Insufficient access
passwd: Authentication token manipulation error

需要在root用户下面执行下面语句打开可以修改密码的开关

cat << EOF |ldapmodify -Y EXTERNAL -H ldapi:///
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcAccess
olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=ldap,dc=com" write by anonymous auth by self write by * none
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to by dn="cn=Manager,dc=ldap,dc=com" write by * read
EOF

然后在自己家目录下面修改密码即可成功

(base) [peng@master ~]$ passwd
Changing password for user peng.
(current) LDAP Password:
New password:
Retype new password:
password change failed: Insufficient access
passwd: Authentication token manipulation error
(base) [peng@master ~]$ passwd
Changing password for user peng.
(current) LDAP Password:
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

参考资料:https://www.136.la/tech/show-698245.html

上一篇:Kubernetes用户指南(二)--部署组合型的应用、连接应用到网络中


下一篇:Linux笔记之用户管理相关命令