Suppose you are working on local PC having LAMP and forgot drupal admin password although you don't have local email client working on your system.
So you are unable to recover the drupal admin password.
Then got to drupal root path
it will generate key like this
password: yournewpassword hash: $S$DegAWQYpYTOHmADPhoFXEUJkf8iFuMHOHPq3yuGPPjfnVWa7wMge
Copy only hash part that is