Sudo Non-Password access to /sys/power/state

Posted by John on Ask Ubuntu See other posts from Ask Ubuntu or by John
Published on 2012-10-15T21:03:41Z Indexed on 2012/10/15 21:49 UTC
Read the original article Hit count: 261

Filed under:
|
|
|

On my computer, pm-hibernate appears to be broken, however using the command echo disk > /sys/power/state appears to work perfectly. Now I just need regular user access to it, using sudo. How do I do this?

The command sudo echo disk > /sys/power/state simply returns bash: /sys/power/state: Permission denied.

Also, I need this in a regularly used script, how can I make it so that I don't have to type in my password for it to work???

© Ask Ubuntu or respective owner

Related posts about bash

Related posts about sudo