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

Re: system shutdown from xdm



	You could also use sudo to let certain people have the privilege of
running shutdown.  They won't need to know the root password, only their
own, and you could even set it up so they don't need their own password. 
Here's an example sudoers entry:

	<username>     <machinename>= /sbin/shutdown -[hr] now

would allow the user _username_ to run either the shutdown or reboot command
on the host _machinename_.  A simple modification to that would allow
_username_ to run the command without her own password.  See man 8 sudo, man
5 sudoers and man 8 visudo.

Gerald

On Tue, May 04, 1999 at 09:45:03AM +0200, Nils Rennebarth wrote:
> On Mon, May 03, 1999 at 07:32:38PM +0200, Helge Hafting wrote:
> > If you want anybody to shutdown without password, make 
> > /sbin/shutdown a suid executable.  Make shutdown a menu choice
> > in your window manager for user friendliness.
> > 
> > Don't do the suid thing unless *anybody* logging into your machine
> > should be able to stop it!  This includes logging in
> > via network or possibly the internet.
> > It is ok for an unconnected home machine though.
> You might create a group of trusted people (local perhaps?), change the
> group of /sbin/shutdown to this group and remove the x bit for 'other':
> 
> chgrp local /sbin/shutdown
> chmod o-x /sbin/shutdown
> 
> Now only user in group local may shutdown the machine.
> 
> Nils
> 
> --
> Plug-and-Play is really nice, unfortunately it only works 50% of the time.
> To be specific the "Plug" almost always works.            --unknown source



Reply to: