LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-12-2013, 11:24 PM   #1
Huamin
Member
 
Registered: May 2011
Posts: 562

Rep: Reputation: 12
Reset password


Hi,
Within Red hat, I can login using one non-root account. As I've lost the password of root account, is there a way to reset the password of root, using this non-root account?
 
Old 05-12-2013, 11:44 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try these http://unix.stackexchange.com/questi...-root-password
 
Old 05-12-2013, 11:45 PM   #3
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
No way using a non-root account.

Here are some things to try:

1) If you have sudo access, try entering "sudo passwd root" from a command prompt. Enter your password once, then a new root password twice.

2) Boot into single user mode and you'll be root. Mount your root filesystem (mount / -o remount,rw), then use passwd to change the root password. Issue sync, then reboot. The way you get into single user mode depends on if you are using GRUB or LILO. It may not work on all distros. You can search the web for GRUB and LILO examples.

3) You can boot a rescue CD or a Linux install CD to a command prompt, it doesn't even necessarily need to be your current distro, then mount your root filesystem, then edit the /etc/shadow file to replace the current root password with the encrypted password string from an account that you know the password for.




Red Hat documents how to do item 2 above, assuming you are using GRUB. https://access.redhat.com/site/docum...ot-passwd.html
 
Old 05-13-2013, 01:13 AM   #4
Huamin
Member
 
Registered: May 2011
Posts: 562

Original Poster
Rep: Reputation: 12
Thanks all.

Last edited by Huamin; 05-14-2013 at 09:13 PM.
 
Old 05-14-2013, 09:25 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Huamin View Post
Thanks all. I am using Red hat. How to do this?

"At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu."
Seriously? That entire line is self-explanatory...what more do you need??

Press a key when the GRUB boot screen comes up. That's it. Follow the instructions in the link you were sent, and if you have problems, then you need to CALL RED HAT SUPPORT, since you're paying for it with your RHEL subscription.
 
Old 05-14-2013, 08:28 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
If you can't find the 'any' key, try the spacebar
 
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
Freenode webchat invalid password msg - How to reset freenode password? codeslayer2010 General 1 02-01-2013 06:31 PM
Reset password Huamin Linux - Software 2 01-04-2013 01:14 AM
Linux 2.6.15.1 The password lost , RESET PASSWORD ANDYCHAN Linux - General 2 08-18-2012 08:05 AM
[SOLVED] Password reset srajeeb Linux - Newbie 5 05-01-2012 02:44 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:04 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
Open Source Consulting | Domain Registration