I'd like to know what I need to do to enable a user to modify values in /sys. As it's a sysfs, changing file permissions is not an option (and I don't like to do it on every boot).
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
|
|||
|
You need to use sudo. If you only want to give them permission to modify a specific value without general sudo access, then you can write a script that updates that particular value, and configure your sudoers file to allow the user permission ONLY to run that script as root. |
|||
|
|
You should clarify what do you want to obtain.
Maybe you want to modify |
|||||||||
|
|
I found a simple python/dbus/polkit example on the Ubuntuforums and changed the PolicyKit policy file defaults from
to
With this change, an unprivileged user now can communicate with the service (running as root, thus being able to write to |
|||
|
|

/syswithout providing a password (in case of the cpufreq example) - which is what I want. So I guess the key here seems to be PolicyKit. – htorque Jan 7 '11 at 13:36