LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-04-2012, 07:44 AM   #1
-rof-
LQ Newbie
 
Registered: Dec 2011
Distribution: RHEL6.0
Posts: 3

Rep: Reputation: Disabled
unable to reset root password in RHEL6


Hello there.
I'm unable to reset root password from Single User Mode in RHEL6.
'passwd' command takes me to the next line without prompting for 'New Password'.

-----------------------------------------
[root@notebook /]# passwd
[root@notebook /]# passwd root
[root@notebook /]#
-----------------------------------------

I even tried it after remounting / in rw mode, but no change in the response to the passwd command.
The command 'passwd' is working to change the password of the current logged in user. So, I suppose the binary may not be corrupted.
Any help is greatly appreciated.
Thank you.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-04-2012, 08:12 AM   #2
ochienged
Member
 
Registered: Oct 2007
Location: Plano, TX
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 70

Rep: Reputation: 26
Strange issue this is. Try setting the password from stdin as illustrated below
Quote:
# echo password | passwd --stdin username
This command will set the password echoed as the password for the username, root in your case. Let me know if it works

Last edited by ochienged; 01-04-2012 at 08:14 AM.
 
Old 01-04-2012, 08:53 AM   #3
-rof-
LQ Newbie
 
Registered: Dec 2011
Distribution: RHEL6.0
Posts: 3

Original Poster
Rep: Reputation: Disabled
Ochienged, thank you for a quick response.
The echo command that you suggested also comes back at the prompt without the expected response.

Any other suggestions?
Thank you!
 
Old 01-04-2012, 09:14 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by -rof- View Post
Ochienged, thank you for a quick response.
The echo command that you suggested also comes back at the prompt without the expected response.

Any other suggestions?
Thank you!
If you're in single-user mode, as root, edit the /etc/shadow file, and remove the encrypted password for root, which is everything between the first and second colon ":", after the user ID. Save the file, reboot. Now, root has no password, and you can boot normally, and set one after things are up and going.

The best suggestion would be for you to call RedHat support...if you're using RHEL, you should be paying for it, which also means you are paying for access to their tech support. If you're NOT paying for RHEL, then DON'T USE IT. You have NO access to updates/patches/bugfixes/packages, and will have a hard time keeping that server updated and running. Use CentOS or Scientific instead, which are 99.x% identical, but FREE.
 
2 members found this post helpful.
Old 01-06-2012, 09:07 AM   #5
-rof-
LQ Newbie
 
Registered: Dec 2011
Distribution: RHEL6.0
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you TBOne.
Your suggestion has worked. The login was successful without prompting for root password. I then assigned one after logon.
Could you also please guide me to solve the issue of unable to change the root password in single user mode?

Thank you once again.
 
Old 01-06-2012, 10:08 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by -rof- View Post
Thank you TBOne.
Your suggestion has worked. The login was successful without prompting for root password. I then assigned one after logon.
Could you also please guide me to solve the issue of unable to change the root password in single user mode?
Thank you once again.
Without knowing more about the system, errors/log messages, no I can't. However, I will say again that if you're using RHEL, you should call RedHat Support. You are paying for it with your RHEL subscription...they can 'guide you' through fixing problems like this.
 
Old 07-01-2012, 07:50 AM   #7
dominicjoseph
LQ Newbie
 
Registered: Jul 2012
Location: india
Posts: 1

Rep: Reputation: Disabled
Your mode maybe in enforcing
type getenforce to know which mode you are in it may be enforcing or disabled
if the mode is enforcing then type setenforce 0 this set your mode to disabled then you type passwd and enter your new password
 
1 members found this post helpful.
  


Reply



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
Unable to reset root password / init: "x" respawning very fast gshenbag Linux - Enterprise 5 12-30-2009 02:19 AM
Unable to reset the root password for mysql on fedora cll975dll Linux - Newbie 1 08-08-2009 09:47 PM
Unable to reset mysql root password soylentgreen Linux - Server 5 08-02-2008 10:05 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
Reset Root password sdsouza Linux - Software 5 11-12-2003 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:31 AM.

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
Open Source Consulting | Domain Registration