LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Password Change Problem (https://www.linuxquestions.org/questions/linux-newbie-8/password-change-problem-4175561158/)

rockxk 12-10-2015 12:20 PM

Password Change Problem
 
Hi

Starting to run out of ideas on this so thought someone might be able to help.
I have a root ssh session open to a Centos 6 server and have changed the password as follows by running passwd.
[root@s1 etc]# passwd
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

All ok to here, but when I try to open another ssh session to test the updated password 'Permission denied, please try again.' is returned. There is normally no problem with multiple ssh sessions running.

I'm a bit worried, as should my internet drop I'll be locked out!

Thanks,

smallpond 12-10-2015 12:57 PM

My boxes all have root login disabled. Can you login as a regular user and do su?

rockxk 12-10-2015 02:14 PM

Thanks, appreciate the advice.

Unfortuantely root was the only 'non-system' user before this. I've tried creating new users with uid0 and 500 and both still fail at the ssh password.

suicidaleggroll 12-10-2015 02:23 PM

So you ssh'd in as root, changed the password, and can no longer ssh in as root? Then either the password is wrong, or you did more than just change the password (changed the sshd config? changed permissions somewhere? shut off the sshd process?).

rockxk 12-10-2015 02:30 PM

Some additional info:

/var/log/secure is picking up the logon failures,

Dec 10 20:15:36 localhost sshd[27390]: Failed password for root from x.x.x.x port 44948 ssh2

The pam tally failures count isn't incrementing.

pam_tally2 --user root
Login Failures Latest failure From
root 0

The /etc/shadow, etc/passwd files are updating on creating users and creating/updating passwords.

e.g.
tester11:x:500:500::/home/tester11:/bin/bash
tester11:$6$BCGwBjbY$NkWWHONssFwxepK5DxWyMkPPSdY2JZvc8b.G1qNL8TyB3Xw4TTy7n5Yc7Pntf6Iv2DS8LZErE/6mcIHFsOqiL.:16779:0:99999:7:::

Not sure if this is relevent.

rockxk 12-10-2015 02:42 PM

Quote:

Originally Posted by suicidaleggroll (Post 5462567)
So you ssh'd in as root, changed the password, and can no longer ssh in as root?

Yes, not good news...

Quote:

Originally Posted by suicidaleggroll (Post 5462567)
Then either the password is wrong, or you did more than just change the password (changed the sshd config? changed permissions somewhere? shut off the sshd process?).

I've tried changing the password to a very easy one and still no luck.

The sshd config is unaltered and the process has been continually running (presumably the existing ssh session would have been lost otherwise).

Permissions in /etc/ are as follows:
-rw-r--r-- 1 root root 1.3K Dec 10 19:29 passwd
-rw------- 1 root root 1.2K Dec 10 18:29 passwd-
---------- 1 root root 510 Dec 10 19:29 gshadow
-rw------- 1 root root 486 Dec 10 18:29 gshadow-
---------- 1 root root 1007 Dec 10 19:29 shadow
-rw------- 1 root root 965 Dec 10 18:30 shadow-


All times are GMT -5. The time now is 03:36 AM.