Open main menu

CDOT Wiki β

Changes

OPS245 Lab 3

242 bytes added, 11:58, 8 February 2021
Part 3: Resetting Forgotten Root Password
#Using your arrow keys, move to '''linux''' or '''linux-efi''' command and replace the argument '''ro''' with the argument <b><code><span style="color:#3366CC;font-size:1.2em;">rw init=/sysroot/bin/sh</span></code></b> (see diagram for reference) and then press <b><code><span style="color:#3366CC;font-size:1.2em;">ctrl-x</span></code></b> to boot.
#The system should boot into text-based mode without prompting for root's password.
#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">chroot /sysroot</span></code></b><br><br>#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">passwd root</span></code></b> in order to change your root password (press '''ctrl-c''' if you wish to abort - i.e. not change password).<br>'''NOTE:''' if you are using SELinux in '''enforcing''' mode, you will also need to issue the command: '''touch /.autorelabel'''. This may take some time depending on the amount of files you have on the file system (usually about 2 minutes).
#To restart in graphical mode, simply enter the command <b><code><span style="color:#3366CC;font-size:1.2em;">exit</span></code></b>, then <b><code><span style="color:#3366CC;font-size:1.2em;">reboot</span></code></b>.
572
edits