Skip to main content

Thread: sudo chmod/chgrp/chown


hi all,

i'd change /sys/class/rtc/rtc0/wakealarm every time reboot notebook, don't have answer passwd-promt (because normaly have root this):
code:
bash -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
first thought manage by:
code:
sudo chmod o+w /sys/class/rtc/rtc0/wakealarm
or change ownership/group:
code:
sudo chgrp gergito /sys/class/rtc/rtc0/wakealarm sudo chown gergito /sys/class/rtc/rtc0/wakealarm
but thing is, every time reboot preveleges , ownership status set root according to
code:
ls -l /sys/class/rtc/rtc0/wakealarm
i don't want login root, nor want set in visudo
code:
%gergito = nopasswd: /bin/su
practically same login' in root...

can please me?

cheers gergito

if i'm understanding you're looking for, put command /etc/rc.local

script runs @ end of boot cycle, , runs root.

code:
#!/bin/sh -e # # rc.local # # script executed @ end of each multiuser runlevel. # make sure script "exit 0" on success or other # value on error. # # in order enable or disable script change execution # bits. # # default script nothing.  # ========== echo 0 > /sys/class/rtc/rtc0/wakealarm  exit 0


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] sudo chmod/chgrp/chown


Ubuntu

Comments