Skip to content

Commit

Permalink
Use public FreeIPA demo server running 389-ds
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Sep 19, 2015
1 parent 3a84c23 commit 60a67e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Demo/pyasn1/derefcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@

from ldap.controls.deref import DereferenceControl

uri = "ldap://localhost:2071/"
uri = "ldap://ipa.demo1.freeipa.org"

class MyLDAPObject(ldap.ldapobject.LDAPObject,ldap.resiter.ResultProcessor):
pass


l = MyLDAPObject(uri,trace_level=0)
l.simple_bind_s('uid=diradm,dc=example,dc=com','testsecret')
l.simple_bind_s('uid=admin,cn=users,cn=accounts,dc=demo1,dc=freeipa,dc=org','Secret123')

dc = DereferenceControl(
True,
{
'member':[
'uid',
'description',
# 'cn',
# 'mail',
'cn',
'mail',
],
}
)
Expand All @@ -35,7 +35,7 @@ class MyLDAPObject(ldap.ldapobject.LDAPObject,ldap.resiter.ResultProcessor):
print dc._derefSpecs().prettyPrint()

msg_id = l.search_ext(
'dc=example,dc=com',
'dc=demo1,dc=freeipa,dc=org',
ldap.SCOPE_SUBTREE,
'(objectClass=groupOfNames)',
attrlist=['cn','objectClass','member','description'],
Expand Down

0 comments on commit 60a67e9

Please sign in to comment.