fixed some things

This commit is contained in:
downhill 2018-11-07 12:08:46 +00:00
commit b512ee2f61
3 changed files with 11 additions and 4 deletions

View file

@ -62,7 +62,7 @@ def objclasses(rdn, uid, connection):
connection.search(rdn, '(%s)' % uid, attributes=['objectClass'])
objclass = []
# get the relevant data
tmp = conn.entries[0]['objectClass']
tmp = connection.entries[0]['objectClass']
# This one sets up the array
for y in tmp:
objclass.append(y)
@ -116,7 +116,6 @@ class CreateUser(object):
# set objectClasses for the new user
obj_new_user = ObjectDef(['inetOrgPerson', 'posixAccount', 'ldapPublicKey'], conn)
w = Writer(conn, obj_new_user)
# newly created users get put into ou=customers
dn = 'uid=%s,ou=users,dc=ungleich,dc=ch' % user
w.new(dn)
# Filling in some of the data