How to Reset NetBrain OVA Root Password in CentOS 7

    1. Reboot the system and press “e” after selecting the kernel line.

    2. When you are in edit mode, go to the line starting with linux16 and append rd.break to the end of this line.

    add rd.break to grub menu rhel 7

    3. Press CTLR+x after appending the rd.break to the kernel. This will reboot the system into emergency mode.

    4. First we will remount the sysroot file system in read write mode and then use chroot to got into a chroot jail:

    # mount -o remount,rw /sysroot
    # chroot /sysroot

    5. Finally, type passwd command in the command line and set the new password for root user. You might get some warnings like “password fails dictionary check” if your password is weak. You may safely ignore the warning and set the password you want.

    # passwd

    6. Make sure that all unlabeled files ( including shadow file ) gets relabeled during booting. Touching the hidden file autorelabel instructs SElinux to relabel the files changed outside of its regular context, like the file /etc/shadow.

    # touch /.autorelabel

    7. To flush all cache to disk, type the command:

    # sync

    8. Type twice the exit command to leave the chroot environment and log out. The system will apply some SELinux contexts and reboot. You can now log in using your newly set root password.

     

    Integrated Edition 8.0Integrated Edition 8.01Integrated Edition 8.02Integrated Edition 8.03Integrated Edition 10.0Integrated Edition 10.0a

    « Previous ArticleNext Article »

     0.0 (0)


    Comments

    No records to display

    About the Author
    Subscription
    Follow Knowledge Base posts
    Please enter your email address to subscribe:

    Email:
    Subscribe
    Tags