[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: turning off computer



On Wed, 5 Mar 1997, Boris D. Beletsky wrote:

> >>>>>>>> On Wed, 5 Mar 1997, I wrote:
> 
>  I> Is there a way for a user without root priveleges to cleanly
>  I> unmount the root file system and shutdown the computer?
>  I>
>  I> I've been running 'init 0' as root before turning off the box, but
>  I> I don't want to have to give out the root password to my family
>  I> (it's bad enough that I know it!) just so they can turn the thing
>  I> off when I'm not around. We'd rather not leave it on when it is
>  I> not in use.
>  I>
>  I> Thanks, Rikki
> 
> Well, the easiest is to write a script and chmod 6755 it.
> consider /usr/local/bin/down to be this script:
> ---------------------
> #!/bin/sh
> # that is a better way imho to shutdown a computer
> /sbin/shutdown -t1 -r now
> ---------------------
> 
> now:
> --------------------
> $ chmod 6755 /usr/local/bin/down
> --------------------

I admit I don't remember how the bit codes work (especially the suid bit)
but it looks like you are trying to create a suid shell script.  This
isn't allowed under linux anymore (or System V, I think) because it caused
too many security problems.  Forgive me if I'm wrong.


I like six eggs when starting on a journey.  Fried - not poached.  And
mind you don't break 'em.  I won't eat a broken egg.  
                                              -- Thorin Oakenshield 



Reply to: