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" <[EMAIL PROTECTED]>
To: "Steven L Smith" <[EMAIL PROTECTED]>
Cc: "tutor" <[email protected]>
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 <[EMAIL PROTECTED]>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" <[EMAIL PROTECTED]>
> To: "vishwajeet singh" <[EMAIL PROTECTED]>
> Cc: "Steven L Smith" <[EMAIL PROTECTED]>, "tutor" <[email protected]>
> 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 <[EMAIL PROTECTED]
> >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 <[EMAIL PROTECTED]
> >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  -  [email protected]
> >> http://mail.python.org/mailman/listinfo/tutor
> >>
> >
> >
> >
> > --
> > Cheers,
> > Vishwajeet
> > http://www.singhvishwajeet.com
> >
> > _______________________________________________
> > Tutor maillist  -  [email protected]
> > http://mail.python.org/mailman/listinfo/tutor
> >
> >
>
> _______________________________________________
> Tutor maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to