fix dn generation
This commit is contained in:
parent
b4bf9318df
commit
bca7a22085
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ def create_user(user, password, firstname, lastname, email):
|
||||||
obj_new_user = ObjectDef(
|
obj_new_user = ObjectDef(
|
||||||
['inetOrgPerson'], conn)
|
['inetOrgPerson'], conn)
|
||||||
w = Writer(conn, obj_new_user)
|
w = Writer(conn, obj_new_user)
|
||||||
dn = 'uid=%s,ou=users,dc=example,dc=com' % user
|
dn = 'uid=%s,ou=users,dc=ungleich,dc=ch' % user
|
||||||
w.new(dn)
|
w.new(dn)
|
||||||
w[0].givenName = firstname
|
w[0].givenName = firstname
|
||||||
w[0].sn = lastname
|
w[0].sn = lastname
|
||||||
|
@ -25,4 +25,4 @@ def create_user(user, password, firstname, lastname, email):
|
||||||
conn.unbind()
|
conn.unbind()
|
||||||
raise Exception("Couldn't write user")
|
raise Exception("Couldn't write user")
|
||||||
conn.unbind()
|
conn.unbind()
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue