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.

I have been working with SSH for a long time, but recently I have needed to add another user to my set up. I followed some instructions I found on the web and did the folllowing.

adduser sam
sudo nano /etc/ssh/sshd_config
     AllowUsers michael, sam
sudo reboot

I set up the user sam completely, added the allow users to the sshd configuration and rebooted. Now michael is sudoer, but the funny thing is, I can login via ssh with Sams credentials but not michaels anymore.

Any ideas?

share|improve this question
    
By "michael is the root user", do you mean michael has user id 0, or michael has sudo permissions? –  Kenny Rasschaert Dec 28 '12 at 9:50
    
Ahh yes, (I believe), he is the account that was set up with the server. –  MichaelH Dec 28 '12 at 9:51

1 Answer 1

up vote 5 down vote accepted

From the man sshd_config:

AllowUsers
This keyword can be followed by a list of user name patterns, separated by spaces.

Then, your line have to be in this form:

AllowUsers michael sam
share|improve this answer
    
Thanks! Damn, one comma... I will accept when I can :) –  MichaelH Dec 28 '12 at 9:56
    
Under voting of answer you can see big check sign :-) But, be honest, I pretend, that list of users will be separated by coma too... –  Jan Marek Dec 28 '12 at 10:04
    
Haha I was just waiting for the 10 minutes to accept an answer.. –  MichaelH Dec 28 '12 at 10:05

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.