Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Reset a Forgotten Root Password in Fedora - DesignLinux

May 29 2020
designlinux 0 Comments

This brief article explains the steps you can take to reset your forgotten root password on a Fedora Linux system. For this guide, we are using Fedora 32.

Read Also: How to Reset Forgotten Root Password in CentOS 8

First, you need to reboot or power on your system and wait until the grub menu is displayed as shown below.

Fedora Grub Menu

Fedora Grub Menu

Press 'e' to edit the grub parameters. This ushers you to a display shown below. Next, locate the line beginning with 'linux' as shown below.

Locate Grub Kernel Parameter

Locate Grub Kernel Parameter

Using the Cursor forward Arrow key, navigate to the section with the rhgb quiet parameter.

Kernel rhgb quiet Parameter

Kernel rhgb quiet Parameter

Now replace the rhgb quiet parameter with rd.break enforcing=0.

Change Grub Kernel Parameter

Change Grub Kernel Parameter

Next press ctrl + x to boot into single-user mode. Next, remount the root filesystem in read and write mode.

# mount –o remount,rw /sysroot
Mount Root Filesystem in Fedora

Mount Root Filesystem in Fedora

Next, run the command below to gain access to the Fedora system.

# chroot /sysroot

To change or reset the root password simply issue the passwd command as shown.

# passwd
Reset Root Password in Fedora

Reset Root Password in Fedora

Provide a new password and confirm it. If all went well, a notification ‘password updated successfully‘ will be displayed at the end of the console.

To reboot the system, simply hit Ctrl + Alt + Del. You can thereafter log in as the root user using the newly created root password.

Upon logging in, run the command below to restore SELinux label to the /etc/shadow file.

# restorecon -v /etc/shadow

And finally set SELinux to enforcing mode using the command.

# setenforce 1

And this concludes our topic on how to reset a forgotten root password on Fedora 32. Thank you for taking the time on this tutorial.

Sharing is Caring…
Share on FacebookShare on TwitterShare on LinkedinShare on Reddit

Related

Tags: Fedora Tips

How to Create Your Own IPsec VPN Server in Linux

Prev Post

How to Setup a Redis Cluster in CentOS 8 – Part 3

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 488
  • 612,667

DesignLinux.com © All rights reserved

Go to mobile version