sudo ldap时出错

pull/2/head
guanghongwei 2014-10-07 18:29:04 +08:00
parent 41dbfbb335
commit 30cbf15b57
1 changed files with 3 additions and 3 deletions

View File

@ -454,12 +454,12 @@ def addUser(request):
sudo_attr = { sudo_attr = {
'objectClass': ['top'], 'objectClass': ['top'],
'objectClass': ['sudoRole'], 'objectClass': ['sudoRole'],
'cn': ['%s' % username], 'cn': ['%s' % str(username)],
'sudoCommand': ['/bin/pwd'], 'sudoCommand': ['/bin/pwd'],
'sudoHost': ['192.168.1.1'], 'sudoHost': ['192.168.1.1'],
'sudoOption': ['!authenticate'], 'sudoOption': ['!authenticate'],
'sudoRunAsUser': ['root'], 'sudoRunAsUser': ['root'],
'sudoUser': ['%s' % username] 'sudoUser': ['%s' % str(username)]
} }
ldap_conn = LDAPMgmt() ldap_conn = LDAPMgmt()
try: try: