Friendly reminder to get rid of bad
So, if I understand correctly, you 'only' want a friendly reminder to get rid of bad habits. In other words, it is OK with a simple tool, that can easily be removed or worked around.
In that case a simple shellscript in a directory in PATH before the real
sudo should work. I suggest that you
- give it the name
- put it in the directory
- give it execute permissions
This means that when you or your colleagues type
sudo something the system will find
/usr/local/bin/sudo # the shellscript
/usr/bin/sudo # the real sudo program
if [ $# -eq 1 ] && ( [ "$1" == "-s" ] || [ "$1" == "-i" ] || [ "$1" == "bash" ] )
echo "Please do not use 'sudo $1'"
Please tell me, if you want something that is more difficult to remove or work around. In that case I have nothing to offer, and will delete this answer.