• 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 Oracle Linux 8.5

  • 00:42 init 6
  • 01:15 rd.break
  • 01:54 mount -o remount,rw /sysroot
  • 02:23 chroot /sysroot
  • 02:32 passwd
  • 03:20 touch /.autorelabel
{{postValue.id}}

To Reset Root Password From Boot On Oracle Linux 8.5

Introduction:

Grub is the boot menu. It allows you to choose between multiple operating systems if you have more than one installed. Additionally, Grub can be used for troubleshooting. It can be used to modify boot arguments or to boot from an older kernel. In this tutorial, I'll show you how to reset the root password in Oracle Linux 8.5.

Procedure:

Step 1: Restart the linux machine by using the below command

[root@localhost linux]# init 6

Step 2: 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 3: From the grub options, go to the line that starts with “ linux” as shown in the below image snap 2

Step 4: you have to go the end of the line and type “ rd.break” and then press ctrl+x as shown in the below image snap 3

Step 5: Now the initrampfs prompt with a 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 -o remount,rw /sysroot” as shown in the below image snap 4

Step 6: 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”

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

snap 5

Step 7: Now we can reboot but, as centos 7 uses 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 8: Now Select Not listed and Enter username as root and Enter the password as shown in the below image snap 7 snap 8

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 oracle linux 8.5 on Oracle Linux 8.5. Your feedback is much welcome.

Tags:
muhammad
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How do I change the admin password in Linux?

A

Type the command 'passwd' and press 'Enter. ' You should then see the message: 'Changing password for user root. ' Enter the new password when prompted and re-enter it at the prompt 'Retype new password.

Q

Where is the user password stored?

A

The /etc/passwd file, which contains information about all users, including their encrypted password, is readable by all users

Q

What is sudo su root?

A

sudo su - The sudo command allows you to run programs as another user, by default the root user

Q

How do encrypt and decrypt passwords in Linux?

A

To encrypt and decrypt files with a password, use gpg command. It is an encryption and signing tool for Linux and UNIX-like operating systems such as FreeBSD, Solaris, macOS, and others.

Q

How does Linux encrypt passwords?

A

Most Unicies (and Linux is no exception) primarily use a one-way encryption algorithm, called DES (Data Encryption Standard) to encrypt your passwords. This encrypted password is then stored in (typically) /etc/passwd (or less commonly) /etc/shadow.

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 David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

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.