1

I am working with tomcat6 and HUDSON, when I run the hudson job it is running as tomcat6 user, what I want to know is there any way to change the HUDSON user as my system login user instead of tomcat6 so that I can run hudson job as my system user.

I just want to know whether it is possible or not and why and how?

I tired editing /etc/init.d/tomcat6 and changed tomcat6 user and grop as my login id, and the restarted the tomcat. Still the hudson jobs are running as tomcat6 user.Am i did the righ thing, if so why it is not working.

Thanks in advance

Anil
  • 13
  • 2

2 Answers2

0

Sure, just run Tomcat as under your user ID. Hudson is just a Java application that, in your case, runs through Tomcat. If you run Tomcat under your account, you will be running Hudson as yourself.

How to actually accomplish this depends on your operating system, distribution, Hudson configuration, etc.

For example, on Ubuntu, the Jenkins (which forked from Hudson) user is set in /etc/default/jenkins in the JENKINS_USER variable. The Jenkins init script basically does an su -l $JENKINS_USER when starting up Tomcat.

If you are running other Tomcat applications, look into how Tomcat is started up. There should be some notion of specifying the user account that will be used for Tomcat.

cjc
  • 24,533
  • 2
  • 49
  • 69
-1

Thanks for your help cjc,

Finally I am able to run my hudson jobs as my own user instead of tomcat6.

For that I changed 2 tomcat6 files. 1./etc/default/tomcat6 and change the TOMCAT6_USER and TOMCAT6_USER as the user and group you like (by default both are assigned to tomcat6)

"# Run Tomcat as this user ID. Not setting this or leaving it blank will use the # default of tomcat6. TOMCAT6_USER=myuser

# Run Tomcat as this group ID. Not setting this or leaving it blank will use # the default of tomcat6. TOMCAT6_GROUP=mygroup"

2.Edit /etc/init.d/tomcat6 and change the TOMCAT6_USER and TOMCAT6_USER as the user and group you like (by default both are assigned to tomcat6)

restart the tomcat6 .

Thanks

anil
  • 16