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

Re: 'shutdown' options



El mié, 04 de 06 de 2003 a las 20:39, Sven Luther escribió:
> On Wed, Jun 04, 2003 at 08:32:09PM +0200, Carlos Perelló Marín wrote:
> > El mié, 04 de 06 de 2003 a las 20:00, Sven Luther escribió:
> > > On Wed, Jun 04, 2003 at 10:02:47AM -0700, Pete Shinners wrote:
> > > > this is more of a gnome than debian question, but...
> > > > 
> > > > how do i enable the "Shutdown" and "Reboot" buttons on the logout 
> > > > dialog? it seems if i am logged in as root they are available, but i'd 
> > > > like to shutdown when i'm normally logged in as well.
> > > 
> > > Look at the archive of this list about a discussion i took part in about
> > > this selfsame subject.
> > > 
> > > Hopefully it will be part of the gnome 2.4 target, but upto now, you
> > > cannot do it (but redhat somehow patched gnome 2.2 to support it).
> > 
> > RedHat did not patched gnome 2.2 to support it, it's supported by
> > default, but the problem is that it does not see a way that the user
> > executes the "shutdown" command and then it does not show you the
> > option.
> 
> Are you sure of that ?

It was last time I looked at it (gnome 1.4) and the official code has
not change lot since then...

Well, It's not the shutdown command (sorry) the commands it use are
"poweroff", "halt" and "reboot"

> 
> > An easy (but really ugly and insecure) solution could be setuid the
> > shutdown command and link it at /bin or /usr/bin
> 
> Nope, this does not work, at least when i tried it. shutdown is not
> satisfied by setuid privilege, it needs real root.

Try with the other commands.

> 
> > RedHat shows it because they use usermode and then they have a
> > /usr/bin/shutdown command that lets a normal user shutdown the computer.
> 
> Maybe having a shutdown command that is a wrapper and calls sudo if
> needed could be a temporary solution.

Yes, it could be a temporary solution but it seems to be as ugly as the
other option I wrote before.. (more secure, but ugly).

> 
> > > > i assume this is permissions on something, but i have been unable to 
> > > > figure out what to change. i'm using debian unstable, but i'm sure 
> > > > applies to all gnome2 platforms.
> > > 
> > > Yep.
> > 
> > Yes it applies to all gnome 1.4 and 2.x releases (perhaps all 1.x, but
> > I'm not sure).
> 
> A workaround for gnome 1.4 was to have a shutdown button which called
> sudo gshutdown. This does not work anymore for 2.X though.


You should be able to do it also with the --with-reboot-command and
--with-halt-command options at compile time, but perhaps you should pass
"sudo, gshutdown"  instead of "sudo gshutdown"

Cheers.

> 
> Friendly,
> 
> Sven Luther
-- 
Carlos Perelló Marín
Debian GNU/Linux Sid (PowerPC)
Linux Registered User #121232
mailto:carlos@pemas.net || mailto:carlos@gnome.org
http://carlos.pemas.net
Valencia - Spain

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente


Reply to: