I frequently work in an environment where, lets call them "pranksters" may gain access to my console.
I am diligent in locking my screen whenever I walk away, but given enough time someone gets the chance to type chmod -R 777 * while i'm looking the other way / sharpening a pencil / whatever.
Is there any way I can force re-entry of my password for certain commands (i'm thinking for rm, chmod, chown, vi ~/.bashrc, &c)?
I have thought of chmodding .bashrc and .bash_profile to read-only for all users (including myself) and then alias chown / chmod / whatever to a script that requires a password but that seems so hacky.
EDIT: I am not a sudoer on this machine
alias chmod=/bin/true. This does not really add security but it might take too long for the prank to succeed. You still have easy access to the unaliased version with\chmod. – Marco Sep 8 '12 at 15:21trueto the path. – trideceth12 Sep 8 '12 at 17:37