Friday, 23 August 2013

Is there any way to disable shutdowning remote machine?

Is there any way to disable shutdowning remote machine?

I sometimes mistakenly shutdown the remote machine by using sudo init 0,
so I wrote something like in one of my rc files:
alias sudo='sudo '
if [ $SSH_CLIENT ]; then
alias init 'echo Never use init when ssh'
fi
However although the rc files is executed, init still runs /sbin/init
rather than the alias. And I don't like to add a global wrapper script
into /usr/local/bin. Is it possible to disable sudo init 0 then? Or I have
to ask the administrator for help?

No comments:

Post a Comment