Commit 86f20252 authored by claes's avatar claes

user b66 removed by script

parent c48794a8
...@@ -26,6 +26,11 @@ if [ "$remove_all" = "y" ]; then ...@@ -26,6 +26,11 @@ if [ "$remove_all" = "y" ]; then
user_found=1 user_found=1
userstr=$userstr" b55" userstr=$userstr" b55"
fi fi
checkuser=`eval echo $currentusers | grep "\bb66\b"`
if [ "$checkuser" != "" ]; then
user_found=1
userstr=$userstr" b66"
fi
checkuser=`eval echo $currentusers | grep "\bpwrp\b"` checkuser=`eval echo $currentusers | grep "\bpwrp\b"`
if [ "$checkuser" != "" ]; then if [ "$checkuser" != "" ]; then
user_found=1 user_found=1
...@@ -52,6 +57,14 @@ if [ "$remove_all" = "y" ]; then ...@@ -52,6 +57,14 @@ if [ "$remove_all" = "y" ]; then
rm -r /home/b55 rm -r /home/b55
fi fi
echo "-- Remove user b66"
if grep -q "\bb66:" /etc/passwd; then
userdel b66
fi
if [ -e /home/b66 ]; then
rm -r /home/b66
fi
echo "-- Remove user pwrp" echo "-- Remove user pwrp"
if grep -q "\bpwrp:" /etc/passwd; then if grep -q "\bpwrp:" /etc/passwd; then
userdel pwrp userdel pwrp
...@@ -72,6 +85,10 @@ if [ "$remove_all" = "y" ]; then ...@@ -72,6 +85,10 @@ if [ "$remove_all" = "y" ]; then
groupdel b55 groupdel b55
fi fi
if grep -q "\bb66:" /etc/group; then
groupdel b66
fi
if grep -q "\bpwrp:" /etc/group; then if grep -q "\bpwrp:" /etc/group; then
groupdel pwrp groupdel pwrp
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment