1

I'm trying to SSH into a server then switch to a user named "jenkins". As you can see from the commands below, after I run su - jenkins I am still in the root user's home dir, and whoami indicates that I am still root, even though su doesn't return an error

don@Don-MacBook-Air:~$ ssh [email protected]
[email protected]'s password: 
Last login: Thu Jan  8 03:02:23 2015 from 10.0.16.57
[email protected]:~ $ whoami
root
[email protected]:~ $ su - jenkins
[email protected]:~ $ whoami
root
[email protected]:~ $ pwd
/root

I've verified that there is a user named jenkins so I don't understand why this is failing. The server is running Red Hat 4.4.7-4.

1 Answer 1

5

Would assume your jenkins is "disabled" by setting it's shell to /bin/false. Try to set the shell to /bin/bash (f.e.)

chsh -s /bin/bash jenkins

then your su should work.

Or use

su -s /bin/bash jenkins

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .