Run commands without having to provide sudo password

On my Lenovo S10-3 running Ubuntu 10.04 I was forced to create scripts to control brightness of the display. These scripts are run when brightness keys are pressed. They use /usr/bin/setpci command.
The problem is that calling this command requires administrative privileges. This makes me a lil bit disturbing, because my girlfriend is also working on this machine from time to time, but I don’t want to make her admin.
In Ubuntu sudo is controled by /etc/sudoers file. On the ubuntu documentation you can find a way how to make some commands for some users to be called without having to type password.
The scripts to control brightness can be downloaded here:

Leave a Reply

Your email address will not be published. Required fields are marked *