Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having trouble logging in with a newly-created password on my CentOS system. I recently installed the continuous integration server Jenkins on CentOS via yum, which created a "jenkins" user. However, although I seem to be able to change the password, when I try and login with the same password, I repeatedly get a "Permission denied" message. I know I'm entering the right password b/c I'm just cutting and pasting. What else do I need to do to activate the user? Here's what happens …

[dalvarado@myserver ~]$ sudo passwd jenkins
Changing password for user jenkins.
New password: 
BAD PASSWORD: it is based on a dictionary word
Retype new password: 
passwd: all authentication tokens updated successfully.
[dalvarado@myserver ~]$ ssh jenkins@localhost
jenkins@localhost's password: 
Permission denied, please try again.

Thanks, -

share|improve this question
What shell is assigned to the jenkins user? – Oliver Salzburg Aug 25 '12 at 14:54
Can you su to jenkins (su jenkins)? Also, make sure you are not picking up any trailing whitespace when you copy/paste. – terdon Aug 25 '12 at 15:04

What happened was that my user was not part of AllowUsers within the /etc/ssh/ssh_config file. Adding that user and restart sshd healed the pain.

share|improve this answer

The Jenkins RPM install creates the dedicated user a no-login user, with /bin/false as the default login shell.

To fix this, do

sudo usermod -s /bin/bash jenkins

and then check this with

grep jenkins /etc/passwd

which should show bash, not false. After setting the default shell to allow the jenkins user to log in, be sure to assign a password with

sudo passwd jenkins

and provide the new password at the prompt.

share|improve this answer
Per your suggestion, I tried this. Executing the first command and running grep gave me "jenkins:x:220:498:Jenkins Continuous Build server:/var/lib/jenkins:/bin/bash", but after changing the password and then trying to login through "ssh jenkins@localhost," I got the same "Permission denied" error. – Dave Aug 26 '12 at 18:14
If you're trying to log in from the same machine, then try this: – Codex24 Aug 27 '12 at 4:25
The grep response indicates you did enable the jenkins user to log in. If you're trying to log in from the same machine, then try this: logged in as yourself, issue "su - jenkins". You should be prompted for a password, provide the one you assigned the jenkins user. If that works, then initialize the ssh function for the jenkins user by creating a private/public key pair after loggin in ("ssh-keygen"). You can also try connecting to the account from the same machine by using "ssh jenkins@hostname" where hostname is the network name of the current machine given by "hostname". – Codex24 Aug 27 '12 at 4:32
Hi, I was able to issue the "su - jenkins" command and successfully enter the password. I then ran ssh-keygen. Disappointingly, trying to run "ssh jenkins@hostname" and entering the same password produced the same error as before -- "Permission denied." – Dave Aug 27 '12 at 14:04

You must log in to answer this question.

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