Re: ldapsearch vs. python-ldap

2009-04-11 Thread Michael Ströder
You might also have hit the problem with automatic referral chasing
within libldap as anonymous.

Try this to switch that off:

l = ldap.initialize('ldap://:389')
l.set_option(ldap.OPT_REFERRALS,0)

> try:
>   #l.simple_bind_s('[email protected]', getpass.getpass())
> l.simple_bind_s('\', getpass.getpass()) 
> # Works
> 
> except Exception, e:

You should rather catch ldap.LDAPError here.

Ciao, Michael.

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


Re: using Kerberos to authenticate to Active Directory from python ldap

2009-04-11 Thread Geert Jansen
On Fri, Apr 10, 2009 at 11:24 AM, Olivier Sessink
 wrote:

> I noticed that there is some C code related to Kerberos in python-ad.
> Is this code required to initialize a kerberos authentication, or is
> this just to change passwords and things like that?

Actually, both. The C code exposes a small subset of the Kerberos API
to Python. I use it for credential management so things like acquire a
ticket using a password or a keytab, and to set or change a password.

Regards,
Geert

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev