Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question

1 Answer 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

share|improve this answer
    
Enh. We don't like link-only answers here. Especially link-only answers to a product. A little spammy. Maybe improve this with some details about this pllugin, or how to do it with this pulgin, or like that there. –  HopelessN00b Sep 8 '14 at 16:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.