Skip to content

Commit

Permalink
better example for ldap backend
Browse files Browse the repository at this point in the history
  • Loading branch information
kakwa committed May 27, 2015
1 parent e559f69 commit 55e7196
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions misc/debug_ldapbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

cfg = {
'module' : 'ldapcherry.backend.ldap',
'groupdn' : 'ou=group,dc=example,dc=org',
'groupdn' : 'ou=Groups,dc=example,dc=org',
'userdn' : 'ou=People,dc=example,dc=org',
'binddn' : 'cn=dnscherry,dc=example,dc=org',
'password' : 'password',
Expand All @@ -42,8 +42,8 @@ def syslog_error(msg='', context='',

inv = Backend(cfg, cherrypy.log, 'ldap', attr)
print inv.get_user('jwatson')
print inv.get_user('test')
#print inv.search('smit')
print inv.get_groups('jwatson')
print inv.search('smit')
user = {
'uid': 'test',
'sn': 'test',
Expand All @@ -54,4 +54,6 @@ def syslog_error(msg='', context='',
'homeDirectory': '/home/test/'
}
inv.add_user(user)
print inv.get_user('test')
print inv.get_groups('test')
inv.del_user('test')

0 comments on commit 55e7196

Please sign in to comment.