0

I have ubuntu on my windows,and I have set a password for it months before now that's the same password of my phone,

But yesterday something wierd happened,my brain updated that password memory and I forgot it,Although I have a close mutation of if which I can recall and I think that's the right password which I used to enter but it's not.

So because of this now I'm also not able to sudo in my ubuntu terminal,Is there a way I can get the ubuntu password back not reset it but get that password back so I can sudo in my ubuntu and also I can get my phone unblocked.

  • You haven't provided any Ubuntu release details, but you have tagged 14.04 which is off-topic on this site. Ubuntu 14.04 LTS is end-of-life, and Ubuntu 14.04 ESM is supported only by Canonical through Ubuntu Advantage, but off-topic here too. The 2014-April release only had 5 years of free support. – guiverc May 21 '20 at 08:38
  • Sorry I actually have 18.04 LTS,I have updated the tags and can you please help me? – Ubaid Parvez May 21 '20 at 08:42
  • Physical access to a computer will "always" allow to get into it, especially if the disks are not encrypted. Holding SHIFT (older ones only?) or hitting ESC (ONCE! After BIOS displays, before "Ubuntu") while booting, will show the "grub menu" where you find the "recovery" options. Google to find descriptions on how to do it. – Hannu May 21 '20 at 09:16
  • I don't have ubuntu machine,I have windows 10 installed and have a ubuntu terminal,basically I need this terminal for sometimes doing something that can't be done from windows terminal – Ubaid Parvez May 21 '20 at 09:19
  • Don't forget to use the search function of the forum, many questions have been answered and you would find this : https://askubuntu.com/q/888810/996009 You might want to help us to help you to find a solution, for that it would be nice to tell us what you've tried and where you've got issues (the Grub menu, often) – B. du Garay May 21 '20 at 08:59

1 Answers1

0

You cannot retrieve your password in plaintext because it is not stored that way.

Passwords are hashed with a salt and stored in /etc/shadow, the first two characters are the salt, the rest is the resulting hash value.

You can try a dictionary attack against the hash:

  • get hash and salt
  • produce a list of all passwords you may have used, maybe with some variations
  • generate hash of each password with the retrieved salt and compare with the retrieved hash
  • remove the password list

If you find a match, it's the password you used.

danzel
  • 6,044