From 53cdff696dc62dd0a73f3b73fefa9175a5c62800 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Fri, 20 Aug 2021 16:34:00 -0500 Subject: [PATCH] Add special handling for LDAP managers --- moduser | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)