Dick Davies
3/11/2005 8:40:00 PM
* Ian Macdonald <ian@caliban.org> [0303 20:03]:
> On Fri 11 Mar 2005 at 20:38:31 +0900, Dick Davies wrote:
> > Ok thanks - I've used Perl::LDAP in the past which lets you rebind and
> > existing connection.
> >
> > Can I do that with ruby-ldap, or do I need a new connection every time
> > I check a username/password pair?
>
> Yes, I'm afraid you need a new connection to bind as a different user.
> On the other hand, is you only want to check the validity of a username
> and password combination, you should be able to pull that information
> from the directory as a user with the privileges required to view
> passwords.
Yeah, but then I need to code an admin user/pass pair into my script,
and that sort of thing gives me the heeby-jeebies..
I suspect perl-ldap actually drops and reloads the connection in any case,
I'm not sure whether the C API lets you reuse a connection by rebinding
as another user.
Looks like I might have to actually open that LDAP programmers guide I got
on ebay before christmas, rather than just letting it sit on the shelf... :)
Thanks for your help anyway!
--
'Robots don't have emotions, and that sometimes makes me feel sad.'
-- Bender
Rasputin :: Jack of All Trades - Master of Nuns