Add a deluser script

This commit is contained in:
Anthony Wang 2021-08-02 22:23:02 -05:00
parent 600d26af2b
commit c6ef272a44
Signed by: a
GPG key ID: BC96B00AEC5F2D76

12
deluser Executable file
View file

@ -0,0 +1,12 @@
#!/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"')