How to reset the password for sudo in Debian
If you are a new Debian administrator, you may want to know how to change the sudo password on a shell. After all, it's good to change your password regularly for any user, especially Super User, who can perform all sensitive operations on Debian. Only Super User or root can change the password for any user account. Other users can only change their own password.
The user password is changed in Debian using the passwd
command.
In this article, TipsMake.com will explain how root users can change their own passwords on Debian servers.
Step 1: Open the Debian command line
You will need to use the Debian command line tool, Terminal, to change the sudo password. Open Terminal via the search for Application Launcher as follows:

You can launch the Application Launcher through the Super / Windows key on the keyboard.
Step 2: Log in as the root user
Only root users can change their own passwords. Therefore you need to log in as root first. Enter the following command to do so:
$ sudo -i
The system will prompt you to enter the current sudo password. Please enter the password and press Enter
.

You are now logged in as the root user (that is shown in the command prompt).
Step 3: Change the sudo password via passwd command
Now that you are logged in as root, you can change the passwd
for the current (root) user by using the passwd
command as follows:
$ passwd

When you type the passwd
command, the system will prompt you to enter a new UNIX root password. If you enter a new password and press Enter
, the system will prompt you to re-enter the new UNIX root password. After you do so, the system will confirm that the password has been updated successfully.
Now, whenever you need to log in as root or perform any installation and configuration that requires root access, you will use this new password.
Step 4: Exit the root login and then Terminal
When you have finished changing the password, you can exit the root login by entering the following command.
$ exit
Once you're logged out, retype the exit
command to exit the Terminal application.
Alternative method
Alternatively, simply enter the following command to log in as root and change the password:
$ sudo passwd root
When you enter the above command, the system will prompt you to enter a new UNIX root password. When you enter a new password and press Enter
, the system will prompt you to re-enter the new UNIX root password. After you do so, the system will confirm that the password was updated successfully.
You should read it
- How to reset Admin password on Windows with Sticky Keys
- How to Use a Password Reset Disk (Windows)
- How to Reset a Forgotten Password on Windows
- How to fix the error of creating Password Reset Disk on Windows
- How to use Password Reset Disk to reset Windows password?
- Fix some errors when using Password Reset Wizard
- How to Reset a Lost Admin Password on Mac OS X
- How to retrieve a Tik Tok password when it is lost
May be interested
- How to extract ISO file with Linuxyou may have downloaded an image file using the popular iso extension. these files (usually quite large) are basically digital versions of optical media discs. all the files on that disk are in the iso archive.
- Should use the Ext4 or Btrfs file system?linux has many different file system options. the current default option is ext4. users are always motivated to change the default file system to btrfs. but is btrfs better than ext4? find the answer through the following article!
- Debian 10 Buster, New features in Debian 10 Busterdebian 10 buster has been released. let's explore the new features in debian 10 buster through the following article!
- How to use the grep command on Debian 10grep stands for global regular expression print. this is a useful command and is widely used by linux system engineers, while searching for a string or patterns with regular files and in the system.
- How to disable color emojis in Debian 10 (Buster)to keep up with the latest android color emojis you see in messaging apps and web browsers, debian 10 has replaced old black and white emojis with new colored icons.
- How to enable / disable automatic login in Debian 10if your system is in a secure location, without any privacy threats, you can avoid the hassle of providing credentials when logging in.