免费注册 查看新帖 |

Chinaunix

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

[ldap] LDAP: Cannot change user password [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-08 17:52 |只看该作者 |倒序浏览
这是转贴https://secure.experts-exchange. ... 1138520&rsid=60
这个问题我也碰到了,大家有什么建议?

I recently activated LDAP on Solaris 9 and I am running into a user password problem.

Basically, I used "idsconfig" to create the domain.  I used "ldapaddent -f /etc/passwd" to create all the users within the LDAP database...but LDAP is not able to identify or change a user password.  

To make troubleshooting easier, I did the following to create a user which is UNIQUE to LDAP (and NOT in the /etc/passwd) ...

1. I created the user "ldapuser" within LDAP with the "ldapaddent" command and used a modified entry from the /etc/passwd (NOTE: LDAPUSER DOES NOT APPEAR IN THE /ETC/PASSWD!)

2. LDAP successfully SEES the new user, since when I enter "su - ldapuser" I successfully su to “ldapuser” and go to correct dir.

3. However, if I "rlogin server1 -l ldapuser" and enter what SHOULD be the password, it simply fails to login (as if I got the password wrong.)

4. I used the “/usr/sbin/directoryserver startconsole” to start the LDAP management console, found the user, and entered a password here.  HOWEVER, when I go back and do step three I get the same results.

5. If I try the command (as root) “passwd –r ldap ldapuser”…I get the following response…
  Enter root's password: <entered correctly>
  New Password: <entered correctly>
  Re-enter new Password: <entered correctly>
  passwd: System error: no ldap password for ldapuser.
  Permission denied

6. I AM able to login into the LDAP Management Console using username:ldapuser and the password I assigned it, but when I try the command (as ldapuser) “passwd –r ldap ldapuser”…I get the following response…
  Enter existing login password: <blank>
  passwd: Sorry, wrong passwd
  Permission denied
  $ passwd -r ldap ldapuser
  Enter existing login password: <password entered in at the management console>
  passwd: Sorry, wrong passwd
  Permission denied

I’M STUCK!  HELP!
Thanks!

论坛徽章:
0
2 [报告]
发表于 2006-11-13 17:33 |只看该作者
现在能从root su到该ldap用户,也能在root下通过 passwd -r ldap 来修改该ldap用户的密码,
但假如直接用该ldap用户来登陆,就不行。
感觉好像是系统在匹配密码的时候没去找ldap server,各位觉得呢?

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
3 [报告]
发表于 2006-11-14 21:38 |只看该作者
pam的配置有问题, pam的配置文件中的参数以及认证模块的顺序很重要.

论坛徽章:
0
4 [报告]
发表于 2006-11-15 10:54 |只看该作者
多谢py,解决了,是少了 -a credentialLevel=proxy,
所以一直取不到ldap server上的passwd

论坛徽章:
0
5 [报告]
发表于 2007-06-04 17:35 |只看该作者

可否发些相关例子给我

最近我也要通过ldap修改用户密码,可否发些相关例子给我。
$sr=ldap_search($ds,"dc=v4cluster,dc=com","(uid=$username)"); //check the db again, this time so we get the password field returned
                $info = ldap_get_entries($ds, $sr);
                $storedpass=$info[0]['userpassword'][0];
不知为什么 $storedpass为空

论坛徽章:
0
6 [报告]
发表于 2007-06-04 17:36 |只看该作者

可否发些相关例子给我。

最近我也要通过ldap修改用户密码,可否发些相关例子给我。
$sr=ldap_search($ds,"dc=v4cluster,dc=com","(uid=$username)"); //check the db again, this time so we get the password field returned
                $info = ldap_get_entries($ds, $sr);
                $storedpass=$info[0]['userpassword'][0];
不知为什么 $storedpass为空

我的邮箱 cooler26412915@163.com QQ:50187147
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP