I've set up sudo not to prompt for password by editing the sudoers file:
myuser ALL=(ALL:ALL) NOPASSWD: ALL
And it works fine, running sudo with no password prompting. But when entering sudo -v I noticed that it prompted for password, only once.
I visudoed sudoers to allow a user to run one bash script with a passwordless sudo, which works fine when logged in (also via SSH). However, when I log in via SSH using public key authentication and configure authorized_keys' command="sudo myScript", I am promped for the user password by sudo. Having the script itself use sudo on another program does however work without requiring a password.
I have two users on my system: itsadok, my main user, and elasticsearch, a user with a different ulimit for running ElasticSearch.
I would like to be able to run stuff as the secondary user without being prompted for password every time.
Websites tell me to use sudo when I have no password, usually tell me one of two things.
It is bad security
Or use 'sudo visudo' and the %admin ALL=(ALL) NOPASSWD: ALL line
I would like to not have a password on anything despite the security risks.
Going with option 2, I'm trying to avoid getting prompted to enter a password at all on my account.
So the problem with option 2, is that sudo is
I'm trying to make my sudoers file allow a user to adjust the backlight without having to enter in the password. This is what I have:
# User alias specification
Cmnd_Alias ADJBL = /usr/bin/su -c "echo 150 >/sys/class/backlight/intel_backlight/brightness"
# For our user..
ouruser HOME=(root) NOPASSWD:ADJBL
..
When I create new Ubuntu 12.10 instances, I typically bootstrap them by manually SSHing onto the machine and editing the sudoers to put a NOPASSWD on the default user (e.g., ec2-user, azureuser, etc.). Then my install scripts can sudo various commands without having to provide a password.
I don't have anything against passwords.
I want to allow the execution of a mount script for everybody. I'm usually working with a domain user.
A PHP program I am working with (LConf) calls a script using sudo.
I have allowed the user apache to run the script and have tested with sudo -u apache /usr/local/LConf/lconf_deploy.sh.
I am being prompted for a password when lconf_deploy.sh calls /usr/bin/sudo -u icinga /usr/local/LConf/LConfExport.pl -o /etc/icinga/lconf -v, but have no problems calling lines before or after this line.
After
I'm running Ubuntu 11.10. I'm trying to setup a user that's essentially a clone of the permissions of the ubuntu user. This works but I'm not able to sudo with this new user without supplying a password (which I don't even have for this user).