Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Reset the Password for Sudo in Debian

Learn how to Reset the Password for Sudo in with clear steps, useful examples, and practical tips. Complete the task correctly and avoid common mistakes.

Table of Contents

This updated guide explains how to Reset the Password for Sudo in Debian through clear steps, practical examples, and important checks that help prevent common errors.

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:

Reset the Password for Sudo in Debian — Step 1: Open the Debian Command Line screenshot 1
Open Terminal

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 .

Reset the Password for Sudo in Debian — Step 2: Log in as the Root User screenshot 2
Log in as the root user

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
Reset the Password for Sudo in Debian — Step 3: Change the Sudo Password Via Passwd Command screenshot 3
Change the sudo password through the passwd command

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.

FAQ

What is the easiest way to Reset the Password for Sudo in Debian?

Start with the requirements in this guide, then follow each step in order. Check the result after every major change so problems are easier to identify.

Can beginners follow these instructions?

Yes. The process is organized into practical steps, and you can repeat any step before moving forward.

What should I check if the method does not work?

Confirm your software or device version, permissions, settings, file format, and internet connection when the task depends on online services.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.