On Sun, Jul 09, 2000 at 05:45:42PM +0000, Miquel van Smoorenburg wrote:

> But.. you have an open root shell! That someone presses ctrl-alt-del is
> the least of your worries, they could simply enter "shutdown -r now".
> Or "rm -rf /". Or "echo 'toor::0:0::/:" >> /etc/passwd. Or ....

I guess I had in the mind a scenario wherein someone, apparently with their
back to a terminal, could in about two seconds twist around, hit ctrlaltdel,
and twist back with an innocent look on their face and their arms folded
across their chest. The other commands, above, would take some time.


> >I suppose the moral of the story is, "Don't leave root logins unattended."
> >(But wouldn't it be simpler to have, as a possible line in
> >/etc/shutdown.allow, "none"?)
> 
> Simply don't use the -a switch then.

I had in mind 'none' in the sense of "no one can use Ctrl-Alt-Del." Without
the -a switch it's available to everyone. (Am I missing something here?)

Quite apart from all this, any user who knows the path '/sbin/shutdown' can
execute it, at least with the permissions shutdown has by default.
Eliminating this kind of possibility was the reason I started looking into
the ctrlaltdel business. Which brings me to ask, is there a reason shutdown
has -rwxr-xr-x perms?

-- 
Bob Bernstein          | When you use some wickedly cool and    
at                     | obscure feature of the language,  you  
Esmond, R.I., USA      | reduce the number of potential readers 
                       | of your code.           -- Paul Prescod

Reply via email to