View previous topic :: View next topic |
Author |
Message |
Barade n00b
Joined: 03 Feb 2009 Posts: 47
|
Posted: Tue Jun 30, 2015 3:08 pm Post subject: Allow executing a command with sudo WITHOUT password |
|
|
http://askubuntu.com/questions/159007/how-do-i-run-specific-sudo-commands-without-a-password
this explains how to achieve what I want.
I have added the following line in visudo:
Code: |
user jenkins = (root) NOPASSWD: /usr/bin/rpm
|
Unfortunately, it still does not work:
Quote: |
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: no tty present and no askpass program specified
Installed module library/utilities with exit code 1
|
Is this a different error? Do I have to add the user jenkins to a specific group? The job should install packages with RPM without requiring any password.
The command line looks like:
Code: |
sudo rpm --force -i *.rpm
|
|
|
Back to top |
|
|
Barade n00b
Joined: 03 Feb 2009 Posts: 47
|
Posted: Tue Jun 30, 2015 3:53 pm Post subject: |
|
|
omg sry fixed it.
It has to be:
Code: |
jenkins myhost = (root) NOPASSWD: /usr/bin/rpm
|
Works now. |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Jul 02, 2015 5:54 pm Post subject: |
|
|
Yay :-)
nm, we all make mistakes, and this way it's documented for anyone else who does a search on site:forums.gentoo.org |
|
Back to top |
|
|
|