OPERATING SYSTEMSOS Linux

Reset Ubuntu user password | Ubuntu 20.04 | WSL2 | Windows 11

This video is going to be about how to reset the forgotten user’s password on the Ubuntu Linux which is installed as a Windows Subsystem for Linux in Windows 11. So, let’s get started.
Before learning how to reset the password, we are going to understand the problem scenario. Let’s open the Ubuntu which I installed on the Windows 11 as a Windows subsystem for Linux. Let’s do something that requires the user’s password, for example sudo apt update. This command is used to update all the packages that are already installed on the Ubuntu Linux from it’s remote repository and requires an administrative privilege or the super user privilege. The user Enkripsan in the system is a super user, so it can run any administrative password but you will need to enter the password of the user. Don’t confuse, it’s not asking you to enter the root password but the user’s password which is currently logged in.
We assume that, we have forgotten the password, we try entering the correct password for three times but we fail each time. Now, let’s learn how to reset the forgotten password.
Open command prompt, type ubuntu2004 which means the version of the ubuntu that is 20.04, config – -default-user root. This will open the Ubuntu app with the default user logged in as root on its next launch. Now close the command prompt, open the Ubuntu Linux and here we can see by default it’s logged in as the root user. Clearing the screen if we type LS space slash home we can see the user Enkripsan, we are going to reset the login password of this user. Type the command PASSWD space the username which in my case is Enkripsan, type the password, again the password is not visible while you are typing, retype the password to confirm. The password of the user encryption is now reset, and we can see the message from PSWD that the password updated successfully. Close this window of the virtual terminal of the Ubuntu app, again open the command prompt and type ubuntu2004 space config space dash, dash default dash user space the username which in my case is Enkripsan and hit enter.
Now when you launch the Ubuntu Linux app next time, it will open up with the user Enkripsan logged in by default. Let’s close this command prompt and check. As we can see, we are logged in as the user enkripsan.
Now we know the password so we can run any task that requires end administrative privilege or the superuser privilege. Let’s see by running the command sudo app update, it’s asking for the password of the user Enrkipsan, so type the password and hit enter, we can see the command execution continues.
OK guys, this is how we can reset a user’s password in Ubuntu 20.04 which is installed on the windows 11 as a windows subsystem for Linux, that’s all for this video I hope the video was useful to you, please subscribe our channel and hit the bell icon thanks for watching see you on other videos till then have a nice time goodbye.

source

ubuntu

40 thoughts on “Reset Ubuntu user password | Ubuntu 20.04 | WSL2 | Windows 11

Comments are closed.