• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to reset Root user password from boot on Rocky Linux 8.6

{{postValue.id}}

To Reset Root Password From Boot On Rocky Linux 8.6

Introduction:

Users can only change their own passwords. However, there is still a sudo/root (SuperUser) account. Root users can change the password of any account, even their own. By default, the root user is locked.

Procedure:

Step 1: While turning on the power button, at the grub boot menu press the “ e” key to edit the first boot entry as shown in the below image

snap 1

Step 2: From the grub options, go to the line that starts with “ linux” go the end of the line and type “ rd.break” and then press ctrl+x as shown in the below image

Snap 2

Step 3: Root shell will appear at this stage, the root file system is mounted in read only mode to /sysroot and it must be remounted with read/write (rw) permission, so enter “ mount &ndash o remount,rw /sysroot as shown in the below image

Sanp 3

Step 4: once the file system is remounted, change it to chroot jail so that /sysroot is used as the root of the file system.this can be done by running “ chroot /sysroot” as shown in the below image

snap 4

Step 5: From here the root password can be reset with “ passwd” command as shown in the below image.

snao 5

Step 6: Now we can reboot but, SELINUX enforcing mode by default we have to fix the context of the /etc/shadow file so create “ touch /.autorelabel” as shown in the below image

SNAP 6

Step 7: Creating this file automatically perform a relabel of all files on next boot.Type “exit” twice and machine will reboot, once the reboot is complete the root account will set with a newly set password as shown in the below image.

snap 7

Step 8: Now the machine will reboot and the login screen appears as shown in the below image

snap 8

Step 9: login using a root user with changed password as shown in the below image

snap 9

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to reset root password from boot on Rocky Linux 8.6. Your feedback is much welcome.

Tags:
markdjokovic
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

If there is a root password set and I have forgotten it, can boot normally and can use sudo?

A

yes, you can use sudo try this from a terminal.# sudo passwd -dl root

Q

I changed my password and then changed it back again. Now I can't get back into my user admin message...could not update ICEauthority file/home/username/.how to recover this?

A

If something is wrong you can fix it with those commands, then logout and login again.To fix the ownership: sudo chown : /home//.ICEauthority.To fix read/write permissions: sudo chmod 600 /home//.ICEauthority

Q

Can't log in after password change (encrypts)? what will do, please give one solution.

A

log in to the terminal.
$ ecryptfs-mount-private
You need to know your old password to mount.

This will unlock and mount your /home/$USER. At this point, we can access /home/$USER. So just cd back into it and run…

$ ecryptfs-rewrap-passphrase ~/.ecryptfs/wrapped-passphrase

Q

If you are logged in as another user (e.g. root), then replace the command

A

ecryptfs-rewrap-passphrase ~/.ecryptfs/wrapped-passphrase
by something like

ecryptfs-rewrap-passphrase /home/[the-user-you-whose-home-you-want-to-rewrap]/.ecryptfs/wrapped-passphrase
or (on a Live CD) by something like

ecryptfs-rewrap-passphrase /[wherever-you-temporarily-mounted-the-home-partition]/[the-user-you-whose-home-you-want-to-rewrap]/.ecryptfs/wrapped-passphrase

Q

What can I do about a "not configured" device?

A

If the device is not the one you need, you can safely ignore the not configured warnings. In some cases, it's just a variation of a supported device. This means it may be relatively easy for a developer to add support for the new card. Otherwise, a new driver would have to be written, which may not even be possible if the device is not fully documented.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaiah ?
What is the use of SUID & SGID commands

How to set the special permissions to the files and folders using SUID and SGID commands...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.