Execute build task in Hudson with root privilages

Posted by jensendarren on Server Fault See other posts from Server Fault or by jensendarren
Published on 2010-05-13T10:48:58Z Indexed on 2010/05/13 10:55 UTC
Read the original article Hit count: 264

I have a build script which executes apt-get and therefore requires root privileges. What is the best way to run this script in Hudson?

Currently the only solution I have found that works is to add an entry to the sudoers file for the user hudson like so:

hudson  ALL=(ALL) NOPASSWD:ALL

However, although my build script now runs without error in Hudson, I am not entirely comfortable with this solution. Is there a better way?

© Server Fault or respective owner

Related posts about hudson

Related posts about sudoers