if then disable root
This commit is contained in:
10
debian/debian-essentials.sh
vendored
10
debian/debian-essentials.sh
vendored
@@ -253,8 +253,14 @@ fi
|
|||||||
# lock root
|
# lock root
|
||||||
if [[ -d /home/akanealw ]]
|
if [[ -d /home/akanealw ]]
|
||||||
then
|
then
|
||||||
passwd -l root
|
isInFile=$(cat /etc/shadow | grep -c 'root:!')
|
||||||
skill -KILL -u root
|
if [ $isInFile -eq 0 ]
|
||||||
|
then
|
||||||
|
passwd -l root
|
||||||
|
skill -KILL -u root
|
||||||
|
else
|
||||||
|
"root account already disabled."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "akanealw account not found, not locking root."
|
echo "akanealw account not found, not locking root."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user