1 / 7

www_devopscheetah_com_how-to-reset-root-user-password-in-linux_

If your Linux server is currently running, you have to reboot it. If it is not yet running, then start it up. At the boot menu, press the u2018eu2019 key to edit the first boot entry.

Atulr
Download Presentation

www_devopscheetah_com_how-to-reset-root-user-password-in-linux_

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DevOpsCheetah Home Linux Cloud  Programming  Monitoring  CI/CD  Categories  How To Reset Root User Password in Linux  June 2, 2021  Rahul Yadav  0 Comments 1>If your Linux server is currently running, you have to reboot it. If it is not yet running, then start it up. At the boot menu, press the ‘e’ key to edit the first boot entry. We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent. Cookie Settings Accept All

  2. 2>From the grub options, find the line that starts which start with  “linux16” and go to the end of it. Type  ‘rd.break’ without quotes at the end of this line, as shown below. 3>Press “Ctrl+x” to boot with these options. It will boot  the initramfs with a root shell.

  3. 4 >At this point, root file system is mounted is inread only mode to /sysroot and must be remounted with read/write (rw) permissions in order to  make any changes. This can be done with the ‘mount -o remount,rw /sysroot’ command. 5> After the file system has been remounted, change into a chroot jail so that /sysroot can be  used as the root of the file system. This is required so that any further commands we run will be in regards to /sysroot. It can be done by running ‘chroot /sysroot’.

  4.   6 > the root password can be reset with the ‘passwd’ command as show below   7> RHEL 7 use SELinux in enforcing mode, so we need to fix the context of /etc/shadow file. This is because when the ‘passwd’ command is run, it creates a new /etc/shadow file. As SELinux is not running in this mode the file is created with no SELinux contexts, which can cause problems when system reboot. Create the /.autorelabel command using ‘touch’

  5.   Creating this file will automatically perform a relabel of all files on next boot. Note that this may take some time depending on the number of files present in  the file system. Enter the ‘exit’ command twice, the first one will exit the chroot jail environment while the second will exit the initramfs root shell and reboot the system. Once the reboot has completed you will be able to use the root account with your newly set password.   Check out : HOW TO CREATE MAIL SERVER ON RHEL MACHINE Tags: Linux password reset , Reset password in linux , root password reset in linux 1 thought on “How To Reset Root User Password in Linux” Seenu rani says: June 5, 2021 at 4:29 pm It’s great how they guide step by step, I had my all my doubts clear Reply Leave a Reply Your email address will not be published. Required fields are marked *

  6. Comment Name * Email * Website Save my name, email, and website in this browser for the next time I comment. POST COMMENT  Previous Post Next Post  Related Posts

  7.   Blogs About Us Contact Us Privacy Policy © 2021. DevOpsCheetah.com PDFmyURL.com - convert URLs, web pages or even full websites to PDF online. Easy API for developers!

More Related