mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 00:09:14 +00:00
初始化github库
This commit is contained in:
19
sudodel.sh
Normal file
19
sudodel.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
username=$1
|
||||
password=$2
|
||||
|
||||
cwd (){
|
||||
dir=$0
|
||||
dirname $dir
|
||||
}
|
||||
dir=$(cwd)
|
||||
. ${dir}/shell.conf
|
||||
|
||||
id $username &> /dev/null
|
||||
if [ $? == '0' ];then
|
||||
userdel -r $username
|
||||
else
|
||||
echo "$username is not exist."
|
||||
exit 3
|
||||
fi
|
||||
ldapdelete -x -h $host -D "cn=admin,dc=yolu,dc=com" -w $ldapassword "cn=$username,ou=Sudoers,dc=yolu,dc=com"
|
Reference in New Issue
Block a user