From Fedora Project Wiki
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 844: | Line 844: | ||
* not tested very deeply, basic operations work: | * not tested very deeply, basic operations work: | ||
#!/usr/bin/python | |||
import ldap | |||
import ldap.modlist as modlist | |||
l = ldap.initialize("ldaps://openldap03.fedoraproject.org", trace_level = 1) | |||
l.simple_bind_s("cn=Tester,dc=gold,dc=testday", "openldap") | |||
ldif = modlist.addModlist({ | |||
"objectClass" : [ "organizationalUnit", "top" ], | |||
"ou" : [ "jvcelak" ], | |||
}) | |||
l.add_s("ou=jvcelak,ou=free,dc=gold,dc=testday", ldif) | |||
print l.search_s("dc=gold,dc=testday", ldap.SCOPE_SUBTREE, "(cn=Manager)") | |||
l.delete_s("ou=jvcelak,ou=free,dc=gold,dc=testday") | |||
l.unbind_s() | |||
'''[mvadkert] Tested program: libuser-0.56.18-2.fc14''' | '''[mvadkert] Tested program: libuser-0.56.18-2.fc14''' |