scripts/deluser

13 lines
257 B
Python
Executable file

#!/usr/bin/python3
import os
# Get user details
username = input('Enter username: ')
# Delete user
os.system('ldapdelete -W -D "cn=Manager,dc=exozy,dc=me" "uid=' + username + ',ou=People,dc=exozy,dc=me" "cn=' + username + ',ou=Group,dc=exozy,dc=me"')