Tuesday, March 5, 2019

Linux Root User Name Accidentally Changed in /etc/passwd

1. Use Linux Bootable usb to boot into rescue mode, if LVM volume cannot be mounted, you can run below command:

# vgchange -a y

2. If your user has sudo privileges, you can run below command to log in and change passwd

# sudo -i -u <wrong user name>

   

No comments:

Post a Comment