So recently I had to change my WSL ubuntu terminal password. I changed the password via root access. But now I cannot seem to revert back to my user-account. This is because I have forgotten the user_account name.
Can someone help me with this?
So recently I had to change my WSL ubuntu terminal password. I changed the password via root access. But now I cannot seem to revert back to my user-account. This is because I have forgotten the user_account name.
Can someone help me with this?
From the root account, you can check the password database. Your non-system users will normally have UIDs in the range 1000 - 65533. So for example:
getent passwd | awk -F: '$3>999 && $3<65534'
Alternatively just look at the contents of the /home
directory, since by default users' home directories are created with the same name as the username:
ls /home
Using this information, you should then be able to set the default user using the method described here: