File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ ln -s $PWD/lib/ad_utils.py $INSTALL/lib/ad_utils.py
2626ln -s $PWD /bin/changepwd.py $INSTALL /bin/changepwd.py
2727ln -s $PWD /bin/ping.py $INSTALL /bin/ping.py
2828ln -s $PWD /bin/resetpwd.py $INSTALL /bin/resetpwd.py
29+ ln -s $PWD /bin/delentity.py $INSTALL /bin/delentity.py
2930ln -s $PWD /bin/upsertidentity.py $INSTALL /bin/upsertidentity.py
3031chmod 700 $INSTALL /bin/*
3132mkdir $INSTALL /ps1_templates
Original file line number Diff line number Diff line change 1+ #!/usr/bin/python3 -u
2+ import sys
3+ sys .path .append ('../lib' )
4+ import ad_utils as ad
5+ import backend_utils as u
6+ import argparse
7+
8+ parser = argparse .ArgumentParser ()
9+ parser .add_argument ('--debug' , help = 'Debug mode' , default = "" )
10+ args = parser .parse_args ()
11+
12+ if args .debug == "1" :
13+ ad .__DEBUG__ = 1
14+
15+ entity = u .readjsoninput ()
16+ config = u .read_config ('../etc/config.conf' )
17+ ad .set_config (config )
18+ if u .is_backend_concerned (entity ):
19+ ad .ad_exec_script (entity ,'delentity.template' )
20+ else :
21+ u .returcode (0 ,"not concerned" )
Original file line number Diff line number Diff line change 1+ try{
2+ Remove-ADUser -Identity {{ e.uid }}
3+ Write-Host "user deleted"
4+ }catch{
5+ Write-Host $_
6+ exit 1
7+ }
You can’t perform that action at this time.
0 commit comments