Save uidNumber used for the latest user created for future reference
This commit is contained in:
parent
a2550e4bff
commit
0fb34dc560
1 changed files with 2 additions and 2 deletions
|
@ -33,9 +33,9 @@ def create_user(user, password, firstname, lastname, email):
|
||||||
if results:
|
if results:
|
||||||
logger.debug("{uid} exists. Trying next.".format(uid=uidNumber))
|
logger.debug("{uid} exists. Trying next.".format(uid=uidNumber))
|
||||||
uidNumber += 1
|
uidNumber += 1
|
||||||
else:
|
|
||||||
logger.debug("{uid} does not exist. Using it".format(uid=uidNumber))
|
|
||||||
|
|
||||||
|
logger.debug("{uid} does not exist. Using it".format(uid=uidNumber))
|
||||||
|
set_max_uid(uidNumber)
|
||||||
w = Writer(conn, obj_new_user)
|
w = Writer(conn, obj_new_user)
|
||||||
dn = 'uid=%s,ou=users,dc=ungleich,dc=ch' % user
|
dn = 'uid=%s,ou=users,dc=ungleich,dc=ch' % user
|
||||||
w.new(dn)
|
w.new(dn)
|
||||||
|
|
Loading…
Reference in a new issue