From: Harald W. <hwa...@ha...> - 2002-07-23 14:17:47
|
Chris Russell wrote: > I found the problem. This: > > if (!($ldap->bind(dn=>$ACCOUNT, $PASSWORD))) { > die "$ACCOUNT cannot bind to $SERVER with the password you supplied\n"; > } > > should look like this: > > if (!($ldap->bind(dn=>$ACCOUNT, password => $PASSWORD))) { > die "$ACCOUNT cannot bind to $SERVER with the password you supplied\n"; > } > > I wasn't feeding the bind method the password statement correctly but it was > still acting as though the bind was successful. I think bind always returns true. You have to check $ldap->code (and $ldap->error, if the former is defined) after a bind. It might as well be that You automatically bind as anonymous when presentng the wrong credentials. Regards, Harals -- Harald Wagener*An der Alster 42*20099 Hamburg*http://www.fcb-wilkens.com |