I want to set the brightness of my hp envy 17 with a script (doesn't work in 12.04). The script is called 'bri'
It containts a line that has to be called as root:
echo $bri > /sys/class/backlight/intel_backlight/brightness
The scritpt is owned by root:
jos@hpux:~/bin$ ls -l bri
-rwsr-xr-x 1 root root 233 Dec 11 22:11 bri
The script works when I am root and also when I do 'sudo ./bri ' something
but when I run it as 'jos' it says 'permission denied'. I tried to change the
sudoers file, adding permissions for the script (see file below) but it just doenst
work. What am I doing wrong? ???????
Jos
-------------------
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
jos ALL = (root) NOPASSWD: /home/jos/bin/gpuoff
jos ALL = (root) NOPASSWD: /home/jos/bin/suspend
jos ALL = (root) NOPASSWD: /sda10/bin/bri
Bookmarks