I load the script in .bash_profileand this script will ask for the correct password whenever the user opens a terminal window. If the user enters the wrong code, the script will run exitto stop the current terminal.
if [ $code = "980425" ]; then
echo hello
else
exit
fi
But I understand that the user can always use ctrl- c
to stop the script and enter the terminal. How to avoid this?
source
share