[Tutor] Accessing LDAP

Steven L Smith ssmith46 at zimbra.naz.edu
Mon Aug 11 17:51:25 CEST 2008



Hmmm... well, that worked, and the previous code snippet worked in interactive mode too... maybe there's something wrong with the user that IIS is running under?  How would I give it the proper permissions?


----- Original Message -----
From: "Rudy Schockaert" <rudy.schockaert at gmail.com>
To: "Steven L Smith" <ssmith46 at naz.edu>
Cc: "tutor" <tutor at python.org>
Sent: Monday, August 11, 2008 11:37:35 AM (GMT-0500) America/New_York
Subject: Re: [Tutor] Accessing LDAP

Ok, then you best stick to Tim's module.

Are you running your script from a workstation or server in the forest?

What I always try first in interactive mode is the following:

import active_directory

ad = active_directory.AD()
print ad

That should already show you if you can connect to AD or not.


On Mon, Aug 11, 2008 at 3:13 PM, Steven L Smith <ssmith46 at zimbra.naz.edu>wrote:

> It is indeed an active directory server, but the sysadmin tells me that it
> is configured to respond to normal ldap queries as well.
>
> I tried Tim's module, and it's giving me an "operations error" when I try
> to use his code snippet to list users...
>
>
> ----- Original Message -----
> From: "Rudy Schockaert" <rudy.schockaert at gmail.com>
> To: "vishwajeet singh" <dextrous85 at gmail.com>
> Cc: "Steven L Smith" <ssmith46 at naz.edu>, "tutor" <tutor at python.org>
> Sent: Monday, August 11, 2008 9:04:50 AM (GMT-0500) America/New_York
> Subject: Re: [Tutor] Accessing LDAP
>
> If by LDAP server you mean Active Directory, then Tim's active_directory
> module is certainly the way to go.
> If you want a more generic LDAP approach, you could give
> python-ldap<http://python-ldap.sourceforge.net/download.shtml>a try.
>
> On Mon, Aug 11, 2008 at 2:17 PM, vishwajeet singh <dextrous85 at gmail.com
> >wrote:
>
> > I think this can be of some help to you
> > http://tgolden.sc.sabren.com/python/active_directory.html
> >
> >
> >
> > On Mon, Aug 11, 2008 at 5:44 PM, Steven L Smith <ssmith46 at zimbra.naz.edu
> >wrote:
> >
> >> Any ideas how I can pull a list of domain users from an LDAP server and
> >> use it programmatically in a Python web application?
> >>
> >> Thanks!
> >> _______________________________________________
> >> Tutor maillist  -  Tutor at python.org
> >> http://mail.python.org/mailman/listinfo/tutor
> >>
> >
> >
> >
> > --
> > Cheers,
> > Vishwajeet
> > http://www.singhvishwajeet.com
> >
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > http://mail.python.org/mailman/listinfo/tutor
> >
> >
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



More information about the Tutor mailing list