From 55e71960f7f31ed0b478e2e6dea28b459a03a0f3 Mon Sep 17 00:00:00 2001 From: kakwa Date: Wed, 27 May 2015 22:00:15 +0200 Subject: [PATCH] better example for ldap backend --- misc/debug_ldapbackend.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/debug_ldapbackend.py b/misc/debug_ldapbackend.py index ce5eb00..5cc9f1a 100644 --- a/misc/debug_ldapbackend.py +++ b/misc/debug_ldapbackend.py @@ -16,7 +16,7 @@ from ldap import SERVER_DOWN 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', @@ -42,8 +42,8 @@ cherrypy.log.error = syslog_error 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', @@ -54,4 +54,6 @@ user = { 'homeDirectory': '/home/test/' } inv.add_user(user) +print inv.get_user('test') +print inv.get_groups('test') inv.del_user('test')