LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Forogot root password (http://www.linuxquestions.org/questions/fedora-35/forogot-root-password-4175467835/)

PraveerD 06-29-2013 12:22 PM

Forogot root password
 
Hello all,

I am using Fedora 17. Did not use fedora for a long time. Now I want to use it but forgot the root account password which is asked when booting the operating system. How can I reset or retrieve it.

Thank you for reading.

Regards

jazz5150 06-29-2013 12:59 PM

I assume it is the root password you forgot and not the BIOS (if that is password protected).
The simple way is to go to runlevel one (single user mode) and reset the password.
Fedora actually has a very user friendly page explaining just how to do that ..
https://fedoraproject.org/wiki/How_t..._root_password
Cheers

vaibhavatalkar 06-29-2013 01:11 PM

step 1)insert fedora cd/dvd
step 2)type rescue or linux rescue
step 3)prompts for language and keyboard,network
step 4)after that rescue mode mount your file systems in the read/write mode.
step 5)press Enter to get the shell prompt.
step 6) type chroot /mnt/sysimage
step 7)type passwd for giving new root password
step 8)exit
finish
hope u helpful but jazz give u link that also helpful in detail...

TB0ne 06-29-2013 03:10 PM

Quote:

Originally Posted by vaibhavatalkar (Post 4980845)
step 1)insert fedora cd/dvd
step 2)type rescue or linux rescue
step 3)prompts for language and keyboard,network
step 4)after that rescue mode mount your file systems in the read/write mode.
step 5)press Enter to get the shell prompt.
step 6) type chroot /mnt/sysimage
step 7)type passwd for giving new root password
step 8)exit
finish
hope u helpful but jazz give u link that also helpful in detail...

Please spell out your words. The link that jazz5150 is the preferred method, unless you're having disk/system problems. And your advice is a bit misleading and unnecessarily difficult. Booting from CD/DVD to do this isn't very user-friendly, since you'd then have to know the device/partition name, how to mount it manually, etc.

Even after following steps 1-5 here, steps 6 and 7 won't work to change the password, since the "/etc/shadow" file is mounted on the boot-media, which is the CD/DVD. You'd have to manually edit the shadow file on the mounted disk, to remove the password, then reboot.

PraveerD 06-29-2013 08:00 PM

Thank you all for replying.

Quote:

Originally Posted by jazz5150 (Post 4980838)
I assume it is the root password you forgot and not the BIOS (if that is password protected).
The simple way is to go to runlevel one (single user mode) and reset the password.
Fedora actually has a very user friendly page explaining just how to do that ..
https://fedoraproject.org/wiki/How_t..._root_password
Cheers

Well I did read that but I am confused with the part to enter recovery. It says edit any file and press the key. Which file I edit is not mentioned. Hence I am confused.

Also when I boot Fedora it gives me two options.

1. is to start fedora
2. its written something like Advanced fedora

When I choose 2 option it takes me to a screen where its written

Fedora blah blah (rescue mode)

So will the above mentioned thing help?

Regards

Firerat 06-29-2013 09:00 PM

Quote:

Originally Posted by TB0ne (Post 4980885)
Please spell out your words. The link that jazz5150 is the preferred method, unless you're having disk/system problems. And your advice is a bit misleading and unnecessarily difficult. Booting from CD/DVD to do this isn't very user-friendly, since you'd then have to know the device/partition name, how to mount it manually, etc.

Even after following steps 1-5 here, steps 6 and 7 won't work to change the password, since the "/etc/shadow" file is mounted on the boot-media, which is the CD/DVD. You'd have to manually edit the shadow file on the mounted disk, to remove the password, then reboot.

I assumed that if you entered a chroot environment the /etc/shadow would be that of the root of the dir that you had choot'd to.

I understand where you are coming from with the 'u' issue, but really do you have to be such a Pedant?
I have noted that you 'open' with this often, quite tiresome.
I am certain my local dialect would 'offend' you. Should a "'txtalect'" be any worse?
Please do not use the trivial as arms.

jazz5150 06-29-2013 11:24 PM

I can not explain it any better than the Fedora site:
-Start the computer
-at the boot screen hold either the CTRL or ESC key (whichever is needed to get you into the boot loader menu)
-choose the entry you want to modify: that would be the entry which you would normally select
-press e
-at the end of the line enter either "single" or "1"
-press ENTER
-press b

Now you are in single user mode

etc.

How to change the root password from the rescue mode is also described at the Fedora site.

TB0ne 06-30-2013 11:32 AM

Quote:

Originally Posted by Firerat (Post 4980971)
I assumed that if you entered a chroot environment the /etc/shadow would be that of the root of the dir that you had choot'd to.

..providing, of course, that a new user had correctly identified the one partition (out of a possible many), that contained the /etc/shadow file in the first place.
Quote:

I understand where you are coming from with the 'u' issue, but really do you have to be such a Pedant? I have noted that you 'open' with this often, quite tiresome. I am certain my local dialect would 'offend' you. Should a "'txtalect'" be any worse?
Yes...read the LQ Rules and guidelines about posting, they specifically mention text-speak, and advise against it. If you don't like it, or people being reminded of it, then please tell a moderator. Trying to decipher someones text-speak isn't pleasant for anyone, anytime. And your local dialect is of no concern, since this is a English-only forum.
Quote:

Please do not use the trivial as arms.
No idea what you even mean here.


All times are GMT -5. The time now is 02:57 AM.