2

Quick question - did some searching but couldn't seem to find anything.

I'd like to be able to stop/start a service on a Jenkins node. Is it possible to give the jenkins user permission for this WITHOUT using sudo? Or is it going to be less secure than just using sudo with the lines:

Defaults:jenkins !requiretty,!lecture
jenkins ALL=NOPASSWD:/etc/init.d/servicename

Thanks.

(edited to add 'hudson' to the title)

shearn89
  • 166

1 Answers1

1

Take a look at the ssh plugin. You can specify a different user and execute your command without having to sudo into that user.

https://wiki.jenkins-ci.org/display/JENKINS/SSH+plugin

Kuka
  • 11