From: Jim H. <ha...@us...> - 2000-12-12 22:53:17
|
Sam, The issue is that you need to know the directory structure for whatever directory server you are searching. If you know that the server has unique identifiers for everyone, then you cand find the dn of the object (account) to which you want to bind by code similar to: $mesg = $ldap->search ( filter => "(|(uid=$who) (cn=$who))") die "not found" if $mesg->count == 0; die "multiple entries found" if $mesg->count > 1; $dn_of_user = $mesg->entry(0)->dn; This of course assumes that either uid or cn are used to identify people in your directory. Other things are possible, these are the most common. --Jim Harle On Tue, 12 Dec 2000, Sam Tregar wrote: > On Tue, 12 Dec 2000 ce...@ca... wrote: > > > I know it's possible, as I am doing it. Here's what my code looks like: > > Thanks! That did the trick. A question - where did you get this > information? I'm curious where I went wrong. > > Perhaps something like this should go in the Net::LDAP docs? In the docs > I was led to believe I was looking for something like > "uid=foo,ou=People,o=bar.com". > > Thanks again! > -sam > > |