domenica 13 maggio 2018

Reset user password in Linux Bash on Windows 10

  1. edit file (in notepad or notepad++):
    %localappdata%\lxss\rootfs\etc\shadow
    
  2. find your normal user, for example:
    user1:$jsdjksadgfhsdf.saflsdf.sadf.safd:17299:0:99999:7:::
    
    and simply remove the hash part (below part)
    $jsdjksadgfhsdf.saflsdf.sadf.safd
    
    you will see a different hash - I hope :), so should look like:
    user1::17299:0:99999:7:::
    
  3. Save the file
  4. start bash again
  5. sudo bash
  6. password this will ask for your new password without requiring previous one.

Nessun commento:

Posta un commento