Add a deluser script
This commit is contained in:
parent
600d26af2b
commit
c6ef272a44
1 changed files with 12 additions and 0 deletions
12
deluser
Executable file
12
deluser
Executable 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"')
|
||||||
|
|
Loading…
Reference in a new issue