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.
 


dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,472
Reaction score
1,074
Credits
9,160
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.
 
OP
G

garryjp

New Member
Joined
Mar 29, 2022
Messages
10
Reaction score
0
Credits
89
Thanks, can i use - Hypervisor type if virtualisation is used
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,472
Reaction score
1,074
Credits
9,160
Type 1 (hypervisor on bare metal) usually no.
Type 2 (hypervisor as an application within the host) usually yes.
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,472
Reaction score
1,074
Credits
9,160
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...
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,472
Reaction score
1,074
Credits
9,160


 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online

No members online now.

Top