Sylnois
Sylnois

Reputation: 1631

ldapsearch user and bind this user

I am using PHP 5.3.3-7 with Debian. I am asking myself if there is a possibility to do something like that:

  1. Bind the admin
  2. Search for a user
  3. Unbind the admin
  4. Bind the found user
  5. Do some modifications with the new binded user

They only step, that I have problem with is the fourth one, because I cannot bind the user, if I haven't got the users password for it. My researches showed me, that there is no change to get the users password via ldap. So maybe there is another way to still bind the found user. Your probably asking yourself, why so, why not just modify (step 5) with the previous binded admin user. Because the binded users has restricted acces.

Upvotes: 0

Views: 340

Answers (1)

heiglandreas
heiglandreas

Reputation: 3861

There's no way to bind as a user without a password. Actually the specification clearly states that the password parameter can not be empty and the cliemt has to take care of that. Otherwise it usually is an anonymous bind which will fail on AD.

As you said the binding user has restricted access, wouldn't it be more appropriate to use an admin-user to make modifications as that user usually has more rights? So perhaps you didn't fully explain what you want to do and - instead of asking whether a certain way works - you should describe what you want to achieve.

Upvotes: 0

Related Questions