446 bytes added
, 01:02, 26 March 2011
To prevent reboot or shutdown over ssh, console or network.
chmod 700 /sbin/reboot
chmod 700 /sbin/shutdown
edit .bashrc for ALL users and root, set it to /etc/skel for new users too!
<pre>
alias reboot='echo Not allowed!'
alias shutdown='echo Not allowed!'
alias init='echo Not allowed!'
alias sh='echo Not allowed!'
alias dash='echo Not allowed!'
</pre>
then disable other shells for users
<pre>
chmod 700 /bin/sh
chmod 700 /bin/dash
</pre>