How to see asterisks when entering our password in the terminal

Asterisks in the terminal password

Practically all Linux users have seen it, or rather we have not seen it: when executing a command that requires the use of a password, when typing nothing appears. The first time I did it, I was not surprised, since my mentor had warned me but, even so, it was strange because we are all used to seeing something appear, such as dots instead of numbers and letters. If this is what you want, in this tutorial we will teach you how to see asterisks when entering password in terminal.

Although the process is simple and safe, in fact we will make a backup copy of the main file, I like to warn that something could go wrong because nothing is 100% safe. Everyone is responsible for what they do, but I'm going to do it with you to show that it works. I'll do it with Ubuntu 18.10 on my Lenovo Ideapad 100-15IDB laptop, my security and less powerful laptop. If you are scared, you can first do the test in a Live Session from a USB.

So you will see asterisks instead of blank spaces

  1. The first thing we will do is a backup copy of the file responsible for this behavior. To do this we open a terminal with the key combination Ctrl + Alt + T. If your operating system does not use this command, you can open the terminal from the applications menu.
  2. We write the following command:
sudo cp /etc/sudoers /etc/sudoers.bak
  1. Well. With «the seat belt already fastened», we execute this other command to open the file:
sudo visudo
  1. We look for the line that says "Defaults env_reset".
  2. We add ", pwfeedback", as you see in the screenshot. That word means: pw = password and feedback = response signal.

show asterisks in password

  1. Then we press Ctrl + O to save, Enter to accept and Ctrl + X to exit.
  2. Finally, we check that the changes work.

Password with Asterisks

To get it back as before, we can do the process in reversethat is, simply remove the text ", pwfeedback" that we added in step 5.

Is this change really useful? Well, useful useful is not, but in Linux we can change practically everything And if this option exists, it is because some users are interested. Personally, it changes little to me if I see something or not because I always enter my passwords at once; If I think something has gone wrong, I write it again from scratch. Do you prefer asterisks or blank spaces?


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.