ldap python, how2?

Jørgen Teunis jorgen at bos.nl
Tue Oct 17 03:28:51 EDT 2000


Hello,

Could anybody tell me where i can find the documentation of the python-ldap
module?
Where there is clearly explained wich functions there are and how they work.
I've some trouble with adding persons to the ldap server. I managed to add
organisationalunits.
I use this code:

try:
 dn = "cn=Jorgen, dc=People, dc=Mailinglist,o=bos,c=nl"
 print "Updating", repr(dn)

        l.add_s(dn,
         [
            ("cn", ["Jorgen"]),
            ("givenname", ["Jørgen"]),
            ("objectclass",["top"]),
            ("objectclass",["person"]),
            ("objectclass",["organizationalperson"]),
            ("Phone", ["065464894"]),
            ("description", ["Miljonair"])
         ]
       )

except ldap.LDAPError:
        pass

l.unbind()

I get no error's but after i execute it, it isn't inserted........

Best. Regards.

Jørgen





More information about the Python-list mailing list