LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Password recovery (not the root password) (https://www.linuxquestions.org/questions/linux-newbie-8/password-recovery-not-the-root-password-4175462583/)

RegulusDeneb 05-19-2013 11:34 AM

Password recovery (not the root password)
 
Hello

I installed SL 6.4 in Virtual Box and have misplaced the password to login to the operating system. Is there a way to reset it? Thanks!

TobiSGD 05-19-2013 11:41 AM

Well, if you have the root password just login as root and set a new password for your user. Use Ctrl+Alt+F1 to switch to a virtual terminal and login as root, then use
Code:

passwd username
to set a new passwd.
You can get back to graphical login with Alt+F7.

RegulusDeneb 05-19-2013 11:51 AM

I always keep passwords in a file, but it appears I didn't record either password this time. :redface: So I don't have the root one either.

TobiSGD 05-19-2013 12:27 PM

Have a look here: http://www.dagorret.net/reset-root-password-in-linux/
This is for Fedora, but should also work on SL.

RegulusDeneb 05-19-2013 01:23 PM

Yes, thank you, but I've googled and there are several webpages with help on recovering the root password. When I get to the grub prompt on the GNU GRUB version 0.97 screen, and enter
Code:

single
it doesn't recognize it. Can't find any pages on recovering the login password, though.

divyashree 05-19-2013 01:35 PM

try the steps as here:

http://www.linuxquestions.org/questi...3/#post4128021

RegulusDeneb 05-20-2013 07:25 PM

Quote:

Originally Posted by divyashree (Post 4954383)

Thanks for the response. However, still having problems.

Here are the steps I've tried and their result.
1) Click Start in VM.
2) Hit any key.
3) Press 'e'.
4) Arrow down to the "kernel" line. Press e.
5) That brings me to "<M_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet"
6) I enter "Single"
7) It boots to the login screen.
(Actually, the last few time I've tried this step, it just goes back to the previous screen with the "kernel" line.

Alternate steps:
3) Press 'a'.
4) That brings me to this line: "<EYTABLE=us rd_NO_DM rhgb quiet"
5) Enter "Single"
6) Boots to the login screen.

"l" and "s" produce the same results.

TobiSGD 05-20-2013 07:40 PM

Try it with init=/bin/bash instead of single, this should give you a basic shell, then you can use
Code:

passwd root
to set a new password for root.
Alternatively, use a live-CD to boot the system, mount the /-partition, chroot into it, then use passwd to change the password.

RegulusDeneb 05-20-2013 08:40 PM

That produces the same results as "Single". When I enter "e" to edit commands before booting, then
Code:

init=/bin/bash
, it brings me back to the "kernel" line.
When I enter "a", then
Code:

init=/bin/bash
, it boots to the login screen.
When I enter
Code:

int=/bin/bash
at the grub prompt, it doesn't recognize it.

I'd rather reinstall than boot from a live cd.


All times are GMT -5. The time now is 11:45 PM.