[plug] Accidental reboot

Mitch Kelly (UCC) mitch at ucc.asn.au
Tue May 10 15:50:30 WST 2011


I must agree, I haven't ever done this... And not using sudo makes it
easier, Much nicer than hackery :)

-----Original Message-----
From: plug-bounces at plug.org.au [mailto:plug-bounces at plug.org.au] On Behalf
Of Bret Busby
Sent: Tuesday, 10 May 2011 3:39 PM
To: plug at plug.org.au
Subject: Re: [plug] Accidental reboot

On 10/05/2011, Brad Campbell <brad at fnarfbargle.com> wrote:
> I have a number of machines I routinely use, and a number of virtual
> machines inside those. I've lost count of the number of times I've run
> "sudo reboot" thinking I was logged into a guest and taken down the host
> server.
>
> I've tried all sorts of tricks with /sbin/reboot and /sbin/shutdown to
> try and stop me doing dumb things to no avail.. then this afternoon it
> hit me.
>
> The system's path is :/bin:/sbin:/..so on
>
> Every user (including root when using an interactive shell) has the path
> prepended with /usr/local/bin.
>
> Put together a quick /usr/local/bin/reboot
> #!/bin/bash
> echo Surprise!
>
> Problem solved. Why did it take me so long to think of it?
>

I find it simpler to avoid using sudo.

It is the devil's tool.

-- 
Bret Busby
Armadale
West Australia
..............

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
 Chapter 28 of Book 1 of
 "The Hitchhiker's Guide to the Galaxy:
 A Trilogy In Four Parts",
 written by Douglas Adams,
 published by Pan Books, 1992

....................................................
_______________________________________________
PLUG discussion list: plug at plug.org.au
http://lists.plug.org.au/mailman/listinfo/plug
Committee e-mail: committee at plug.linux.org.au




More information about the plug mailing list