Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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'.
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.
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.
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 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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.