-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserAdmin.sh
More file actions
43 lines (40 loc) · 811 Bytes
/
Copy pathUserAdmin.sh
File metadata and controls
43 lines (40 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
function chkpermis(){
echo "File: $1"
if [ -s $1 -a -x $1 ]; then
./$1
else
echo " Wait 1 second to add x permission to it"
chmod +x $1
echo "You File is running as"
./$1
fi
}
echo "1. Create user"
echo "2. Delete user"
echo "3. Rename user"
echo "4. Changepwd user"
echo "5. Dis_Ena_user"
echo "6. Exit"
echo -n "Please input number(1,2,3,4,5,6):"
read num
case $num in
1) echo "Create user"
file=CreateUser.sh
chkpermis $file ;;
2) echo "Delete user"
file=DeleteUser.sh
chkpermis $file ;;
3) echo "Rename user"
file=RenameUser.sh
chkpermis $file ;;
4) echo "Change password user"
file=ChangePasswdUser.sh
chkpermis $file ;;
5) echo "Disable Enable user"
file=Dis_Ena_User.sh
chkpermis $file ;;
*) echo "Exit"
echo "See you next time | By BeunRithy"
exit;;
esac