LinuxQuestions.org
Help answer threads with 0 replies.
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 11-14-2017, 12:57 AM   #1
awild
LQ Newbie
 
Registered: Mar 2015
Posts: 3

Rep: Reputation: Disabled
Authentication failure after changing root password in single user mode


Hi, I just inherited 4 servers running Ubuntu 14.04.5. The root passwords were changed prior to delivery and have since been lost. I booted into single user mode, typed "mount -rw -o remount /" and then used the passwd command to change the root password.

When I rebooted, I was able to login in as root (on a tty). I changed the root password again just so I have done it in normal multi-user mode. I could use the server as normal.

A couple of days later I tried to log in via tty again and the root password failed to log me in. I had to reboot into single user mode and repeat the password change process again. I have had to do this on all 4 servers and several times over. Why does the root password not 'stick' even after changing it a second time once I'm in multi-user mode?

I tried logging in at the tty using an account I created once successfully in as root. That failed too. I changed the root password in single user mode and logged back in as root after a reboot. Then I used su to login as myself, which worked. However, I then tried to su as root from there and it failed again with the message "Authentication failure".

I figured that I would try to install security updates so I tried running unattended-upgrades -d. After running the command, the message "No packages found that can be upgraded unattended and no pending auto-removals" was displayed.

I'm not in a position where I can just reinstall and start from scratch. I would appreciate any advice.

Thankyou
 
Old 11-14-2017, 10:15 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,409

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
Quote:
Originally Posted by awild View Post
Hi, I just inherited 4 servers running Ubuntu 14.04.5. The root passwords were changed prior to delivery and have since been lost. I booted into single user mode, typed "mount -rw -o remount /" and then used the passwd command to change the root password.

When I rebooted, I was able to login in as root (on a tty). I changed the root password again just so I have done it in normal multi-user mode. I could use the server as normal.

A couple of days later I tried to log in via tty again and the root password failed to log me in. I had to reboot into single user mode and repeat the password change process again. I have had to do this on all 4 servers and several times over. Why does the root password not 'stick' even after changing it a second time once I'm in multi-user mode?

I tried logging in at the tty using an account I created once successfully in as root. That failed too. I changed the root password in single user mode and logged back in as root after a reboot. Then I used su to login as myself, which worked. However, I then tried to su as root from there and it failed again with the message "Authentication failure".

I figured that I would try to install security updates so I tried running unattended-upgrades -d. After running the command, the message "No packages found that can be upgraded unattended and no pending auto-removals" was displayed.

I'm not in a position where I can just reinstall and start from scratch. I would appreciate any advice.

Thankyou
Why are you logging into UBUNTU servers as root? That is not normal. I try never to use the root accounts directly, always log in as myself and use Privilege escalation tools to run (and log) high admin operations.
 
Old 11-14-2017, 05:56 PM   #3
awild
LQ Newbie
 
Registered: Mar 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Yes I understand. However, I have no other account that I can get in with. The account that I created for myself when I accessed via root, does not work from the login prompt. Once I log in as root, I can su to myself no problem. It appears to be a problem with the authentication system. Once I can fix it, I won't be logging in as root.
 
Old 11-14-2017, 07:16 PM   #4
scasey
Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.4
Posts: 429

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by awild View Post
Yes I understand. However, I have no other account that I can get in with. The account that I created for myself when I accessed via root, does not work from the login prompt. Once I log in as root, I can su to myself no problem. It appears to be a problem with the authentication system. Once I can fix it, I won't be logging in as root.
Suggest that you are not using the correct password for the normal user. The last time I struggled with this kind of problem, it was because the password I was trying to set was not long enough or otherwise didn't pass the system's rules. Just a thought.
 
Old 11-14-2017, 10:54 PM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,291

Rep: Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587
I strikes me that single user mode might be set for a different keymap than multiuser mode. Try setting the password as something simple. I know on Ubuntu, if you set the root password to blank, it locks the root account.

I've had success booting with an install DVD, running rescue, and changing the the password from a chroot shell.
 
Old 11-14-2017, 11:14 PM   #6
awild
LQ Newbie
 
Registered: Mar 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
I finally figured it out. I found that there was a Puppet agent running on the servers and it was undoing my config work. I shut down puppet and edited the root crontab. That fixed the root password mystery. As for logging in to a tty using the account I created, I just added the account to /etc/security/access.conf (which was also maintained by Puppet), plus gave it remote access. Now I don't have to use root :-)

Thanks for your input folks... much appreciated.
 
  


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
[SOLVED] can't enter root password in single-user mode zolainfo Linux - Hardware 2 07-02-2015 09:37 AM
Single user mode, asking for root password dmz1213 Linux - Newbie 1 09-08-2012 08:43 PM
Resetting root password in single user mode vedaprasad Linux - Newbie 1 10-04-2011 01:08 PM
[SOLVED] No prompt for root password after attempting to enter single user mode infinite_scale Linux - Newbie 3 07-30-2011 10:51 AM
Slackware's Single User Mode requires root password too? StevenO Slackware 2 01-25-2006 09:28 PM

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

All times are GMT -5. The time now is 07:19 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