Pass lost

garryjp

New Member
Joined
Mar 29, 2022
Messages
10
Reaction score
0
Credits
89
I lost the credentials to the Ubuntu 20.04 LTS Server. I need the instructions on how I could log into a Linux host without knowing a valid login/password combination, and without permanently altering any local files.
 


and without permanently altering any local files.

That might be more difficult. Generally the method is... boot from a Live image (USB drive)
mount the partition where your /etc/passwd and /etc/shadow files are on the hard drive.

Copy the hashed password string from an account on another computer that you DO know the passwd to.

root:$y$j9T$WX8UwUNCxrBBwiRkhC&*FR#SGmggDYbK.j8fRbe22gQPqaAgQY4A:19057:0:99999:7:::

Usually the part between the colons ":". to the mounted filesystem. Then reboot.
There are more detailed instructions around the web, but you will have to change these files.
No way around it that I know of. Once you can login again. Reset your passwd again.
 
Thanks, can i use - Hypervisor type if virtualisation is used
 
Type 1 (hypervisor on bare metal) usually no.
Type 2 (hypervisor as an application within the host) usually yes.
 
it is Ubuntu....in my case

Not what OS is the VM running. What virtualization hypervisor are you running?
Proxmox, VMware ESX, KVM QEMU, VirtualBox, etc...
 


 

Members online


Top