scripts/moduser

18 lines
286 B
Text
Raw Normal View History

#!/usr/bin/python3
import os
# Get user details
username = input('Enter username: ')
2021-08-20 21:34:00 +00:00
if username == 'Manager':
2021-08-20 22:03:44 +00:00
bind_user = 'cn=Manager,dc=exozy,dc=me'
2021-08-20 21:34:00 +00:00
else:
2021-08-20 22:03:44 +00:00
bind_user = 'uid=' + username + ',ou=People,dc=exozy,dc=me'
# Modify user
os.system('ldapvi --user ' + bind_user)