FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 11-10-2010, 10:37 AM
cantabile
 
Default Shutdown and reboot

Le 10/11/2010 13:12, joker-jar@yandex.ru a écrit :

Please tell me the best way to allow non root user to use halt, reboot,
shutdown e t.c. May be set group "power" to this binaries?

$ ls -l /sbin/halt
-rwxr-xr-x 1 root root 15152 2010-10-02 13:26 /sbin/halt

(Not only for me but in distro). No?


You don't need to change permissions or ownership of /sbin/halt (or any
other file).


Set up sudo to allow members of a group of your choice to execute
/sbin/shutdown


This may interest you:
https://wiki.archlinux.org/index.php/Allow_Users_to_Shutdown
 
Old 11-12-2010, 02:44 PM
Øyvind Heggstad
 
Default Shutdown and reboot

On Wed, 10 Nov 2010 21:12:24 +1000
"joker-jar@yandex.ru" <joker-jar@yandex.ru> wrote:

> Please tell me the best way to allow non root user to use halt,
> reboot, shutdown e t.c. May be set group "power" to this binaries?
>
> $ ls -l /sbin/halt
> -rwxr-xr-x 1 root root 15152 2010-10-02 13:26 /sbin/halt
>
> (Not only for me but in distro). No?
halt:
dbus-send --system --print-reply
--dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager
org.freedesktop.ConsoleKit.Manager.Stop

reboot:
dbus-send --system --print-reply
--dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager
org.freedesktop.ConsoleKit.Manager.Restart

suspend:
dbus-send --system --print-reply
--dest=org.freedesktop.UPower /org/freedesktop/UPower
org.freedesktop.UPower.Suspend

hibernate:
dbus-send --system --print-reply
--dest=org.freedesktop.UPower /org/freedesktop/UPower
org.freedesktop.UPower.Hibernate

or use sudo.
 

Thread Tools




All times are GMT. The time now is 09:21 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org