LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2015, 12:20 PM   #1
rockxk
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Rep: Reputation: Disabled
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,
 
Old 12-10-2015, 12:57 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,801

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
My boxes all have root login disabled. Can you login as a regular user and do su?
 
Old 12-10-2015, 02:14 PM   #3
rockxk
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-10-2015, 02:23 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,522

Rep: Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106
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?).

Last edited by suicidaleggroll; 12-10-2015 at 02:24 PM.
 
Old 12-10-2015, 02:30 PM   #5
rockxk
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-10-2015, 02:42 PM   #6
rockxk
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
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 View Post
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-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root password change problem. greenntlu Ubuntu 1 10-13-2012 01:38 PM
[SOLVED] If I change root password may I have any problem on my server?? mmanu87 Red Hat 7 06-12-2012 10:36 AM
Problem with password change.. Alex.Gabriel Slackware 7 10-11-2010 07:27 AM
Problem with change password in SM deepanvenkatesh Linux - Software 1 01-19-2007 12:04 PM
NIS password change problem wahid111 Slackware 3 08-12-2006 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration