Skip to content

Instantly share code, notes, and snippets.

@gnilchee
Created August 23, 2015 02:30
Show Gist options
  • Save gnilchee/7c6f05a2cd6c289ecd8f to your computer and use it in GitHub Desktop.
Save gnilchee/7c6f05a2cd6c289ecd8f to your computer and use it in GitHub Desktop.
How to change root password outside of Single user mode if grub is password protected from live cd
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "RootGroup00" using metadata type lvm2
# vgchange -a y RootGroup00
# lvdisplay
--- Logical volume ---
LV Name /dev/RootGroup00/RootVol00
VG Name RootGroup00
. . .
--- Logical volume ---
LV Name /dev/RootGroup00/SwapVol00
VG Name RootGroup00
# mkdir /mnt/recovery
# mount -t [ext3,ext4,xfs,etc] /dev/RootGroup00/RootVol00 /mnt/recovery
# chroot /mnt/recovery /bin/bash
/ # passwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment