[Tutor] Accessing LDAP

vishwajeet singh dextrous85 at gmail.com
Mon Aug 11 15:33:07 CEST 2008


I am not able to reproduce the problem as it works pretty fine at my end.

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

> <%
> import active_directory
> for person in active_directory.search ("objectCategory='Person'"):
>        Response.Write(person.displayName)
> %>
>
> Results in...
>
> Python ActiveX Scripting Engine error '80020009'
>
> Traceback (most recent call last): File "<Script Block >", line 17, in
> <module> for person in active_directory.search ("objectCategory='Person'"):
> File "C:\Python25\Lib\site-packages\active_directory.py", line 747, in
> search return root ().search (*args, **kwargs) File
> "C:\Python25\Lib\site-packages\active_directory.py", line 743, in root _ad =
> AD () File "C:\Python25\Lib\site-packages\active_directory.py", line 712, in
> AD return AD_object (GetObject ("LDAP://%s" % default_naming_context)) File
> "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 73, in
> GetObject return Moniker(Pathname, clsctx) File
> "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 88, in
> Moniker moniker, i, bindCtx = pythoncom.MkParseDisplayName(Pathname) COM
> Error: An operations error occurred. (0x-7ff8dfe0)
>
> /metaproject/index.asp, line 121
>
>
> ----- Original Message -----
> From: "vishwajeet singh" <dextrous85 at gmail.com>
> To: "Steven L Smith" <ssmith46 at naz.edu>
> Cc: "tutor" <tutor at python.org>
> Sent: Monday, August 11, 2008 9:15:38 AM (GMT-0500) America/New_York
> Subject: Re: [Tutor] Accessing LDAP
>
> I have used it and it works pretty well for me.Can you show the code
> snippet
> you are trying to execute??
>
> On Mon, Aug 11, 2008 at 6:43 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
> >
>
>
>
> --
> Cheers,
> Vishwajeet
> http://www.singhvishwajeet.com
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Cheers,
Vishwajeet
http://www.singhvishwajeet.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080811/ac3ea464/attachment.htm>


More information about the Tutor mailing list