LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 01-06-2009, 09:33 AM   #1
jbottiger
LQ Newbie
 
Registered: Oct 2008
Location: Central FL
Posts: 21

Rep: Reputation: 0
Cannot change root password (let alone standard user's password)


At the RHEL prompt, I entered the standard user's username/password combo. Linux displays a message box stating:

"Your account has expired; please contact your system administrator."

Next, I entered "root" in the username field and entered the root password (which expired also--keep in mind that passwords are set to expire after x days). Linux displays a message box stating:

"You are required to change your password immediately (password aged)."

When prompted to "Enter current UNIX password", I entered the new password (was that the right thing to do?); Linux displays a message box stating:

"The change of the authentication token failed. Please try again later or contact the system administrator."

I rebooted the system and got into command line mode; somehow I logged in as "root" (don't know exactly how, but needed to change the password there). At the "#" prompt, I type "passwd root"; Linux displays the message "Changing password for user root", followed by the message "passwd: Authentication information cannot be recovered."

Please advise. Thanks.

John B.
 
Old 01-06-2009, 09:40 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by jbottiger View Post
When prompted to "Enter current UNIX password", I entered the new password (was that the right thing to do?)
No. The current password refers to the one that was currently set. This is asked for in order to confirm that it is indeed you changing the password and not someone else.

Quote:
I rebooted the system and got into command line mode; somehow I logged in as "root" (don't know exactly how, but needed to change the password there). At the "#" prompt, I type "passwd root"; Linux displays the message "Changing password for user root", followed by the message "passwd: Authentication information cannot be recovered."
Sounds like you booted into single-user mode. Try using "passwd" instead of "passwd root" and see if it makes any difference. Or alternatively, give the regular multi-user prompt above the correct password. BTW, I'm moving this to the Red Hat forum, as it's not a security issue.
 
Old 01-06-2009, 10:12 AM   #3
jbottiger
LQ Newbie
 
Registered: Oct 2008
Location: Central FL
Posts: 21

Original Poster
Rep: Reputation: 0
Still Cannot Change Passwords

Quote:
Originally Posted by win32sux View Post
No. The current password refers to the one that was currently set. This is asked for in order to confirm that it is indeed you changing the password and not someone else.
Tried current password--received same authentication token error.

Quote:
Sounds like you booted into single-user mode. Try using "passwd" instead of "passwd root" and see if it makes any difference.
Same problem occurred with "passwd" (sans "root").

Last edited by jbottiger; 01-06-2009 at 10:14 AM.
 
Old 01-06-2009, 02:29 PM   #4
jbottiger
LQ Newbie
 
Registered: Oct 2008
Location: Central FL
Posts: 21

Original Poster
Rep: Reputation: 0
After further investigation with one of my colleagues and with Red Hat Tech Support, it appears that there are multiple versions of the /etc/shadow and the /etc/passwd files (e.g., with a "~" at the end) which differ from each other. My colleague used gedit which generated the passwd~ and shadow~ files, causing a slight corruption. Copied the existing passwd and shadow files to backup files, and copied the passwd~ and shadow~ files to the respective passwd and shadow files.

Bottom line, use "vi" or "nano" to edit the files, not "gedit" if you can.

Thanks for your help.

John B.
 
Old 01-06-2009, 08:03 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,264

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
I think you're supposed to use vipw, if RH has that. Ideally you wouldn't edit the file directly anyway.
 
  


Reply

Tags
rhel51


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
how to change root password without knowing the grub password ramesh.mimit Red Hat 8 10-15-2011 05:12 AM
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 02:02 AM
change Root Password even if the password in the grub is also set sheelnidhi Linux - General 6 08-30-2006 07:27 AM


All times are GMT -5. The time now is 12:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration