ldap - 使用 ldapmodify 命令更改 LDIF 文件中的密码
问题描述
我有一个测试用户的 LDIF 文件,我想更改密码。
我使用了 ldapmodify 命令:
ldapmodify -h localhost -D uid=testuser,ou=users,dc=mytest,dc=org -w <password> <<!
dn: uid=testuser,ou=users,dc=mytest,dc=org
changetype: modify
replace: userPassword
userPassword: myNewPassword
!
modifying entry "uid=testuser,ou=users,dc=mytest,dc=org"
它看起来像工作
但是当我打开我的 file.ldif 时,密码没有改变并且 ldapsearch 命令不起作用。
ldapsearch -x -h localhost -D uid=testuser,ou=users,dc=mytest,dc=org -w myNewPassword -b uid=testuser,ou=users,dc=mytest,dc=org
ldap_bind: Invalid credentials (49)
感谢您的帮助
解决方案
推荐阅读
- android - 在 Android 7 及更高版本上监控网络流量
- python - 用正则表达式匹配单词序列
- jquery - 无法在数据表上实现分页
- javascript - 无法覆盖 Webview 中的 javascript 函数
- c# - 将一种编码转换为另一种编码的最快方法
- reactjs - 反应打字稿Webpack块大小
- kubernetes - 更新 pod 中的默认搜索域
- java - Map 接口是否扩展或实现了其他接口或类?
- java - 使用 jWindow 作为启动画面,显示效果很好,但图像不画……只是打开了空白的 jWindow……有什么想法吗?
- regex - 剂量 regexp_replace 不能在 postgresql 中使用多正则表达式(|)?否则我该怎么办?