I try using su - user from the execute shell. But it doesn't seen to work.
Any advise?
I try using su - user from the execute shell. But it doesn't seen to work.
Any advise?
It's probably because su is asking for a password interactively. Try setting up sudo so that your hudson user has permissions to run your build command as user without entering a password. See the sudoers manual.
Added: First of all, I'm not completely sure what error you're running into. If you continue to have problems, you should describe what happens in more detail (error messages, log output) and what you've done to try to narrow down the issue.
Second, you can also set up ssh to localhost using a key pair (Google finds lots of examples, here's one).
Instead of su - user
, use:
ssh user@localhost cmd
You'll need to create a key pair (without a password) as the hudson user and install the public key in the authorized_keys file of the user you want to log in as.
Finally, you should question whether all this is necessary. Why can't the hudson user run your builds? User-specific setup is a smell.
Hi but i am using Solaris 10 OS. Doesn't seen to have this sudo command.
anyway i am using the solaris console..i type su - user.
It doesn't prompt me for a password and i will be under this account user already.
Any other workaround?
Is there any other workaround because i am not the owner of the Solaris 10 OS. I can only have access to the Solaris zone.
I encoutered this error when executing in hudson any other ideas?