Add special handling for LDAP managers

This commit is contained in:
Anthony Wang 2021-08-20 16:34:00 -05:00
parent ce4580f4cc
commit 53cdff696d
Signed by: a
GPG key ID: BC96B00AEC5F2D76

View file

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