Internal Attributs

Nicolas EISEN neisen at
Mon Aug 10 17:27:38 CEST 2009


I use OpenLDAP, python-ldap with python2.5.

I need to get internal attributs (createTimeStamp, modifyTimestamp, 
...). In many tutorial, I found script some like this ( ):


import sys, ldap

    l ='localhost', 389)
    l.simple_bind_s("uid=LDAP Admin,ou=System Accounts,dc=toph,dc=com", "toto")
    print "Erreur n°", l.errno

res = l.search_s("dc=toph,dc=com", ldap.SCOPE_SUBTREE, "objectclass=*", None, 0);
for dn,hash in res:
    print "dn:", dn
    for attr in hash.keys():
        print "attr %s: %s" % (attr, hash[attr])
    print '-'*80

And the tutorial output containt createTimestamp &Co ...

I try this script on my system, and I don't have this attributs. But 
with phpLDAPadmin or in command line, I can get it :

    ldapsearch -D "uid=LDAP Admin,ou=System Accounts,dc=toph,dc=com" -W -b "dc=toph,dc=com" "uid=user1" '*' '+'

Why ?

More information about the python-ldap mailing list