01-13-07 12:13 PM
On 01/12/2007 04:25 PM, Robert McDonald wrote:
> As root, I can successfully put my machine in standby mode with
>
> "echo mem > /sys/power/state"
>
> I realize that this isn't robust, but it works for me. (The hibernate
> command does not work -- it reports being unable to unload certain
> modules.)
>
> Anyway, I would like to allow users other than root to execute a script
> that contains this command, so that others can put the machine to sleep.
> How should I approach this? I tried using visudo to edit sudoers but
> couldn't get it to work. Any thoughts?
>
> This is running Debian etch. Thanks!
-----------/usr/local/bin/gostandby----------
#!/bin/sh
echo mem > /sys/power/state
----------/etc/sudoers-------------
# Put users who should be able to put the system
# into standby into the POWER group.
User_Alias POWER = robert
POWER ALL= /usr/local/bin/gostandby
----------end--------
Hope This Helps (HTH)
(Newsgroups trimmed to alt.os.linux.debian)
--
Windows Vista and your freedom in conflict:
http://www.regdeveloper.co.uk/2006/..._eula_analysis/
[ Post a follow-up to this message ]
|