Make style consistent across *user scripts
This commit is contained in:
parent
eac3f38a6c
commit
01665179eb
2 changed files with 3 additions and 3 deletions
2
adduser
2
adduser
|
@ -58,7 +58,7 @@ gidNumber: {uid}'''
|
|||
f.write(ldif)
|
||||
|
||||
# Add user
|
||||
ret = call(['ldapadd', '-D', 'cn=Manager,dc=exozy,dc=me', '-y', '/etc/ldappass', '-f', filename])
|
||||
ret = call(['ldapadd', '-y', '/etc/ldappass', '-D', 'cn=Manager,dc=exozy,dc=me', '-f', filename])
|
||||
if ret != 0:
|
||||
return
|
||||
remove(filename)
|
||||
|
|
4
moduser
4
moduser
|
@ -16,10 +16,10 @@ def moduser(username):
|
|||
environ['EDITOR'] = 'micro'
|
||||
|
||||
if username == 'root':
|
||||
run(['ldapvi', '-y', '/etc/ldappass', '--user', 'cn=Manager,dc=exozy,dc=me'])
|
||||
run(['ldapvi', '-y', '/etc/ldappass', '-D', 'cn=Manager,dc=exozy,dc=me'])
|
||||
else:
|
||||
dn = 'uid=' + username + ',ou=People,dc=exozy,dc=me'
|
||||
run(['ldapvi', '--user', dn, '--base', dn])
|
||||
run(['ldapvi', '-D', dn, '--base', dn])
|
||||
|
||||
if len(argv) > 1:
|
||||
moduser(argv[1])
|
||||
|
|
Loading…
Reference in a new issue