Hi,

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 ( 
http://jfgiraud.free.fr/programmation/ldap/ ):

#!/usr/local/bin/python

import sys, ldap


try:
    l = ldap.open('localhost', 389)
    l.simple_bind_s("uid=LDAP Admin,ou=System Accounts,dc=toph,dc=com", "toto")
except:
    print "Erreur n°", l.errno
    sys.exit(1)

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 ?
Thanks.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to