Make style consistent across *user scripts

This commit is contained in:
Anthony Wang 2023-07-13 20:09:48 +00:00
parent eac3f38a6c
commit 01665179eb
Signed by: a
GPG key ID: 42A5B952E6DD8D38
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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])