[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Problem doing BIND with uid
You have to bind with the distinguished name of the entry. In the example
below, your DN seems to be 'cn=michael k stella, ou=...'. What you need to
do is to (programatically) search for a user's entry by uid and then
retrieve the DN for that entry. Only then can you re-bind as that person.
Schematically that would be:
enter uid [mstella]
search directory for uid=mstella
if not found or not exactly one result, then error
dn = ldap_getdn() of retrieved entry
bind with dn [cn=michael k stella, ou=...]
Regards,
-JP
On Thu, 2 Nov 2000, Michael Stella wrote:
>
> I'm trying to do this (prompted for password):
>
> poplar# ldapsearch -D 'uid=mstella,ou=People,dc=myseasons,dc=com'\
> -b 'ou=people,dc=myseasons,dc=com' 'uid=mstauffe'
> Bind Password:
> LDAP Server is V2: execute command with LDAP V2...
> ldap_simple_bind_s: Invalid credentials
>
>
> But when I do this:
>
> poplar# ldapsearch -D 'cn=michael k stella,ou=People,dc=myseasons,dc=com'\
> -b 'ou=people,dc=myseasons,dc=com' 'uid=mstauffe'
>
> the command works perfectly. Why is this? I am using a web-based password
> changer thing written in perl, and I'd prefer to use the uid fields rather than
> the users' full names. I am missing something, and I suspect it's *very*
> simple. Apologies if this has been discussed before, I could not find anything
> useful in the archives.
>
> I can provide slapd.conf or ldap.conf if need be.
>
>
> --
> Michael Stella mySEASONS.com
> Sr. Unix Administrator http://www.myseasons.com
> 860-395-1732 x110
>
>