Ask Your Question
0

Resetting Root Password (Cannot type "passwd")

asked 2013-12-16 04:38:24 -0500

jimsneider100 gravatar image

updated 2014-09-28 15:41:26 -0500

mether gravatar image

Hi I ran into a problem while using Fedora 19 (x64Bit) where I cannot use any su commands after booting into the recovery menu. Basically I am trying to reset my root password, so I went into GRUB and modified the boot command to single after my kernel name and then hit "F10" to boot that command. Since I have encrypted partitions, the login window came up and I typed in my password and then a bunch of text went on screen until I got around to this point. Now on everything I've read, it says I should be using su commands so I can reset my root password because I forgot it... There is no option to type "passwd" on here because it asks for my root password which I do not know. Thanks if someone can help me!

Below is a picture I took off my phone of my problem:

Since this wouldn't let me post links I'll read it off: "Welcome to rescue mode... Give root pass for maintenance (or type control D to continue". When I hit ctrl D it will boot into Fedora. Thanks for anyone who can help!

edit retag flag offensive close merge delete

Comments

You do understand, don't you, that when you boot into single mode, you're logged in as root and don't need to use su?

sideburns gravatar imagesideburns ( 2013-12-16 09:55:44 -0500 )edit

Yes when I get to the point where it says maintenance mode I just hit control D to bypass it then when it boots into Fedora I tried the passwd, but it only changes my admin password, not the root password. I followed all the steps in the forgotten root password link as I've already been doing :/

jimsneider100 gravatar imagejimsneider100 ( 2013-12-17 00:34:59 -0500 )edit
1

And what, I have to ask, is the difference between your admin password and the root password, considering that the admin account in Linux is normally called "root?"

sideburns gravatar imagesideburns ( 2013-12-17 01:37:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-12-29 08:08:59 -0500

elegantuni gravatar image

updated 2013-12-29 08:11:51 -0500

In seems like in fedora you would need to use a live cd to recover the root password. First run the live cd desktop and at a terminal as root user. Because the partition is encrypted you need to do something like this if your / partition was on /dev/sda3 and the name of the /dev/mapper/ was test1 (/dev/mapper/test1) is

# cryptsetup luksOpen /dev/sda3 test1

Enter your encryption password

# mkdir /mnt/harddrive

# mount /dev/mapper/test1 /mnt/harddrive

# mount -t proc none /mnt/harddrive/proc

# mount --rbind /sys /mnt/harddrive/sys

# mount --rbind /dev /mnt/harddrive/dev

# chroot /mnt/harddrive /bin/bash

# passwd root

Enter your new password

# exit

# umount -l /mnt/harddrive

Then reboot and take out the live cd and the password should be changed.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-12-16 04:38:24 -0500

Seen: 1,940 times

Last updated: Dec 29 '13