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.

CentOS 5.3. I can SSH into the system as root just fine. Added a user and set their password. They have shell access (/bin/bash). I can su to the account from root just fine. I updated /etc/ssh/sshd_config with:

AllowUsers myNewUser

And restarted sshd: /etc/init.d/sshd restart

When trying to ssh into the server with the new user, I get a permission denied. And yes, I've double and triple checked that I am using the correct password. Any help is appreciated.

share|improve this question

migrated from stackoverflow.com Jun 5 '10 at 2:31

This question came from our site for professional and enthusiast programmers.

    
If you turn on verbose logging you'll probably be able to tell quite quickly what the problem is. –  Kaleb Pederson Jun 5 '10 at 2:15
1  
look at /var/log/secure and /var/log/messages for ways to debug and post that info here –  Mike Jun 5 '10 at 4:12
    
su <newuser> is different from su - <newuser>. Did you try the latter, which starts a login shell? –  mpez0 Jul 17 '10 at 14:18

2 Answers 2

Is the uid >= 500? On RHEL/CentOS, the default PAM config has a check for uid. Another possibility could be the password is expired (if you set it as root using passwd <username>) - does a login rather than su to the user reveal any issues there? Does it work using Pubkey authentication rather than a password?

The reason is probably logged in authlog, and troubleshooting without that log data is really just speculation.

share|improve this answer

Can you change the Log level in your sshd_config to look like this:

LogLevel DEBUG

Restart SSH. Then try logging in as myNewUser and post the output from /var/log/secure here (after stripping out any specific identifying information!) 1

1: The DEBUG log level can violate User privacy according to the man-page for sshd(5)

share|improve this answer

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.