Can't log in to Linux maintenance mode – lost password
Quote from moshe on 16/03/2022, 7:52 amProblem
User tries to log in to maintenance mode in order to recover linux file system ( fsck ) or fix any other issue
Solution
When the GRUB loader shows during boot press the spare bar to pause boot select your boot kernel.
Type ‘e’ to edit the default kernel line. And then type ‘e’ again on the line that starts with ‘kernel’
Add ‘init=/bin/bash’ to the end of the ‘kernel’ line then press enter.
Type ‘b’ to boot with the modified kernel parameters.Mount the file system with read write with the following command
# mount -o remount,rw /Change your root password:
# passwd rootRemount the filesystem back to read only:
# mount -o remount,ro /Reboot your server using hard reset or CTR-ALT-DELET
Problem
User tries to log in to maintenance mode in order to recover linux file system ( fsck ) or fix any other issue
Solution
When the GRUB loader shows during boot press the spare bar to pause boot select your boot kernel.
Type ‘e’ to edit the default kernel line. And then type ‘e’ again on the line that starts with ‘kernel’
Add ‘init=/bin/bash’ to the end of the ‘kernel’ line then press enter.
Type ‘b’ to boot with the modified kernel parameters.Mount the file system with read write with the following command
# mount -o remount,rw /Change your root password:
# passwd rootRemount the filesystem back to read only:
# mount -o remount,ro /Reboot your server using hard reset or CTR-ALT-DELET