Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We use Hudson as our CI server. My question is it possible to have two jobs, say A and B, so that each runs under different user accounts?

Thanks.

P.S. Hudson runs inside Tomcat on windows server 2003.

share|improve this question

1 Answer 1

Unfortunately, no, its not, at least not in the ways you're thinking. If you're running this within Cygwin or similar, you can setup sudo or run a batch script that would allow you to assume another user for the purposes of running a script.

However, as it sounds like you're running this on straight up Windows, you could likely use the runas command to do a similar thing--however, this would require you to place the commands to be run in Hudson as a separate batch script to be run. Also keep in mind that running jobs as users requires that the Tomcat user be able to run as what is likely an administrator, which opens up a whole slew of possible security issues and is NOT recommended.

share|improve this answer
    
Why does Tomcat has to be an administrator? Is it only an admin who can use runas? –  mark Mar 25 '11 at 8:30
    
To be honest, I'm not aware of the specifics. The link in my response mentions that this is not the case, but you'll have to setup explicit permissions for the user Tomcat runs as. –  Andrew M. Mar 25 '11 at 12:55
    
+1 for the idea to use runas, but I still have to validate this approach to mark your reply as the answer. –  mark Mar 27 '11 at 11:34

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.