How to show stars in Debian terminal when entering password

Whenever you are prompted to enter a password in a Debian terminal, enter your password without receiving any visual instructions or feedback from the screen. In such a situation, it is likely that you could fake your password by entering it incorrectly. This is the reason why visual feedback is so important. It helps to track the number of characters entered, especially when entering a password, so you cannot skip a single character or enter additional characters. This visual feedback is provided by the display of asterisks (***) when entering passwords. In this article, we will tell you how to enable this feature in the Debian Buster 10 terminal.

Important: It is important to mention here that although this is useful, it is not a very good safety practice to make the stars visible. It displays the number of characters in your password if your computer is shared or remotely accessible. Thus, the risks actually make your computer risky.

Creating password-visible stars in the terminal

To make password asterisks visible in a Debian terminal, you need to follow these steps:

1. Launch the terminal through a search in the Application Launcher as follows:

Access to the Application Launcher can be obtained through the Super / Windows key.

The newly opened terminal window is shown below:

Terminal window

2. Now type sudo visudo at a command prompt and press Enter. As soon as you press Enter, you will be prompted for a password.

Run visudo

3. When you enter your password, a system file called sudoers will open using the Nano editor in Terminal. This file is shown below:

Edit sudoers file

4. Using the arrow keys, scroll down to the line Default env_reset. This line is highlighted in the following image:

Change sudoers settings

5. Change this line by adding pwfeedback in the end. This is shown below:

Enable pwfeedback

6. After this modification, click Ctrl + X to save the changes and press y in response to the question shown below:

Save the changes to the configuration file

7. You will be prompted for the file name for recording. Just press Enter to select the default.

Save file

8. After this step, you will return to the normal terminal window. Just enter the exit and press Enter or click on the cross located in the upper left corner to close the terminal window.

9. Now, the next time you open the Terminal and enter any command using sudo, you can view the asterisks on the password you entered, as shown below:

How to show stars in Debian terminal when entering password

This way you can make password asterisks visible in the Debian terminal by following a few simple steps. These settings will be saved for the future if you do not change them by changing this file again.

How to show stars in Debian terminal when entering password

Sidebar