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.

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,533