I am using Fedora for almost 20 years. I have Fedora 34 and I wanted to change the root password. I used: “How to Reset the root Password :: Fedora Docs” procedure “In Rescue Mode”. It goes to prompt: bash-5.1#, I typed “passwd” for the new password. It changed to the new password with no problems and successfully. I rebooted with: “/sbin/reboot -f”, my computer reboots and now it doesn’t understand any password. I tried the procedure a few times and still doesn’t work. I used for the username the “root” and for password the new successfully installed password. What is wrong in here? Thank you.
Sounds like you missed the part about repairing SELinux labels.
Why not just
sudo passwd root
(It requires a user in wheel group that can use the sudo command)
Yes you were right, now I can login into my Fedora 34.
How we say when something happens right: BINGO!
Thank you very much for your advice.
This is what I did:
- Reboot the PC and when GRUB appears hit the “e” key.
- At the end of line with: linux … I put a space and then I typed: rw init=/bin/bash and pressed F10.
- The prompt I get is: “bash-5.1#”
- bash-5.1# passwd
- bash-5.1# New password: I typed: whatniceadvise
- bash-5.1# Retyped: whatniceadvice
- Restore SELinux … I just typed:
- bash-5.1# touch /.autorelabel
bash-5.1# /sbin/reboot -f
My computer rebooted OK, it did some SELinux… stuff then I’ve got the small window with the password.
I typed: “whatniceadvice” and I could see all my work now, as it was before!!!
Thank you again!! Saved me a lot of time…