scripts/moduser

17 lines
291 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':
bind_user = 'cn=Manager,dc=exozy,dc=me'
else:
bind_user = 'uid=' + username + ',ou=People,dc=exozy,dc=me'
# Modify user
2021-08-20 21:34:00 +00:00
os.system('EDITOR=nano ldapvi --user ' + bind_user)