免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3665 | 回复: 6
打印 上一主题 下一主题

[ldap] 使用什么命令可以验证ldap中用户的密码? [复制链接]

论坛徽章:
1
2015元宵节徽章
日期:2015-03-06 15:50:39
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-02-26 11:02 |只看该作者 |倒序浏览
我已经将passwd导入ldap了,后来通过在root下使用passwd修改了用户的密码,我想知道ldap是否也自动更新?
请问用什么命令验证?

论坛徽章:
1
2015元宵节徽章
日期:2015-03-06 15:50:39
2 [报告]
发表于 2007-02-26 11:02 |只看该作者
ldapsearch行不行?但是我man ldapsearch似乎没有要求输入用户和密码的选项。

论坛徽章:
0
3 [报告]
发表于 2007-02-26 12:00 |只看该作者
Have you configured pam_ldap appropriately? Otherwise the passwd command cannot take effect on your LDAP account.
You can simply use ldapsearch with the -D option to point out a user DN and the -W option to verify the password stored in LDAP server.

论坛徽章:
1
2015元宵节徽章
日期:2015-03-06 15:50:39
4 [报告]
发表于 2007-02-26 13:07 |只看该作者
OK, I will check out if I have configured the pam_ldap.conf
but could you give me an ldapsearch example.

  1. ldapsearch -x -D 'uid=ldap_user,dc=example,dc=com' -W
  2. Enter LDAP Password:
  3. ldap_bind: Invalid DN syntac (34)
  4.              additional info: invalid DN
复制代码

it seems that I typo the ldapsearch options.

[ 本帖最后由 ioiioi 于 2007-2-26 13:10 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2007-02-26 14:38 |只看该作者
try it:
ldapsearch -x -D "uid=ldap_user,dc=example,dc=com" -W
And double check whether the DN of uid=ldap_user,dc=example,dc=com is existent.

论坛徽章:
1
2015元宵节徽章
日期:2015-03-06 15:50:39
6 [报告]
发表于 2007-02-26 17:19 |只看该作者
oh, I misunderstand the dn a couple minutes ago.
the dn following the option -D should be the complete dn within ldap database.
and the correct dn is 'uid=ldap_user,ou=People,dc=example,dc=com'

Authenticating the user's password depend on the ACL configuration.
so, the guy who want to accoplish authentication through this method are advised to check your /etc/ldap/slapd.conf

  1. ----clip-----
  2. access to attrs= *
  3.       by anonymous auth
  4.       by * none
  5. ----clip-----
复制代码

Maybe

  1. ----clip-----
  2. access to attrs= *
  3.       by * read
  4. ----clip-----
复制代码

could work as well.

论坛徽章:
1
2015元宵节徽章
日期:2015-03-06 15:50:39
7 [报告]
发表于 2007-02-26 17:20 |只看该作者
oh, I misunderstand the dn a couple minutes ago.
the dn following the option -D should be the complete dn within ldap database.
and the correct dn is 'uid=ldap_user,ou=People,dc=example,dc=com'

Authenticating the user's password depend on the ACL configuration.
so, the guy who want to accoplish authentication through this method are advised to check your /etc/ldap/slapd.conf

  1. ----clip-----
  2. access to attrs= *
  3.       by anonymous auth
  4.       by * none
  5. ----clip-----
复制代码

Maybe

  1. ----clip-----
  2. access to attrs= *
  3.       by * read
  4. ----clip-----
复制代码

could work as well.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP