diff --git a/moduser b/moduser index efc1e5c..cb79a1f 100755 --- a/moduser +++ b/moduser @@ -6,7 +6,11 @@ import os # Get user details username = input('Enter username: ') +if username == 'Manager': + bind_user = 'cn=Manager,dc=exozy,dc=me' +else: + bind_user = 'uid=' + username + ',ou=People,dc=exozy,dc=me' # Modify user -os.system('EDITOR=nano ldapvi --user uid=' + username + ',ou=People,dc=exozy,dc=me') +os.system('EDITOR=nano ldapvi --user ' + bind_user)