Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This may be a very basic question, I was logged in as root, and decided to change the password, so used passwd and changed it, later I logged out and can't log back in.. Now I had another ssh user on the system, logged in with that one, used su - and the password that I set for root, and that worked to authenticate me as super user. Why can't I log in with root tho like before?

Coda returns 'User name or password not accepted by server.' I tried passwd root and then change it, but still doesn't work.

Any ideas would be appreciated

share|improve this question
    
Did you change anything in your sshd_config like PermitRootLogin? –  Khaled May 2 '12 at 13:07
    
Just guessing here, but if you are connecting via ssh, it will probably not allow root to login via ssh. –  Bart De Vos May 2 '12 at 13:07
    
it did couple hours ago –  Saulius Antanavicius May 2 '12 at 13:10
    
#PermitRootLogin yes so does that mean thats blocking it off? –  Saulius Antanavicius May 2 '12 at 13:12
    
If You have hashed PermitRootLogin it means that its set for default value. Default value for PermitRootLogin is yes and that means this is not an issue –  Alan Kuras May 2 '12 at 13:24

3 Answers 3

up vote 0 down vote accepted

Be careful that your password is not refused by the server when you change it with passwd. The password should not be a easy guessable word found in a dictionary for example...

share|improve this answer
    
it was a-zA-Z-1-9@£%$%@ –  Saulius Antanavicius May 2 '12 at 13:13
    
Ok... I hope that wasn't your real password as you should never disclose it to anyone by any means of social engineering :) –  Silviu May 2 '12 at 13:16
    
Ofcourse, anyhow no one knows the IP its a test box VPS, anyhow, need to get the root access back and can't do it :/ –  Saulius Antanavicius May 2 '12 at 13:22
    
No one cares what the IP is, it's easy to "find." A burglar doesn't need to know the address of the house that looked nice as they cased the street, and automated scanning of IP ranges doesn't need to know your system is there to stumble on it. –  Bart Silverstrim May 2 '12 at 13:31
1  
Did the password include a '£'? I don't know what encoding you're using, but if that's not a single byte, that might be your problem. –  wfaulk May 2 '12 at 15:27

Are you logging into the server directly as root? Change this as soon as you cn, and dont admit to suh poor practises publicly ;)

Are you able to log in with the old password? If so, it may be the ssh passphrase that is being used.

share|improve this answer
    
This should probably be a comment rather than an answer. –  Bart Silverstrim May 2 '12 at 13:17
    
I dont have the privs to comment everywhere. –  Sirch May 2 '12 at 13:21

Maybe the 2 things are not connected - the password has been updated but meanwhile somone has (very sensibly) disabled root ssh access.

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.