PDA

View Full Version : [ubuntu] sudo chmod/chgrp/chown



kalug
November 6th, 2009, 01:10 PM
Hi all,

I'd like to change /sys/class/rtc/rtc0/wakealarm every time I reboot my notebook, so that I don't have to answer to the passwd-promt (because normaly you have to be root to do something like this):

bash -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"First I thought I could manage it by:

sudo chmod o+w /sys/class/rtc/rtc0/wakealarmor I could just change the ownership/group:

sudo chgrp gergito /sys/class/rtc/rtc0/wakealarm
sudo chown gergito /sys/class/rtc/rtc0/wakealarmBut the thing is, that every time I reboot the preveleges and ownership status are set back to root according to

ls -l /sys/class/rtc/rtc0/wakealarmI don't want to login as root, nor do I want to set in visudo

%gergito ALL = NOPASSWD: /bin/suPractically it would be the same as login' in as root...

Can please someone help me?

Cheers Gergito