How to make the root password show in asterisks

Terminal on OS X

One of the things that bothers me the most when managing my Ubuntu is not being able to see the root password that I enter and that sometimes I get confused but I don't realize it until the system tells me that it is wrongly entered.

Surely it has happened to you at some time (it has happened to me many times) and if we saw how many characters we have entered, the result would not be the same and we could correct it. The use of blanks is done so that no one can visually guess or know information about our root password. This can be done easily through the configuration file of the terminal of our Ubuntu. We explain it step by step how to do it below.

How to enter asterisks in the terminal

For the configuration, first we have to open a terminal, either through Dash or by pressing "Control + Alt + T", done this, we write the following in the terminal:

sudo visudo

This will open a terminal configuration file, an important file so if we are not sure, it is best not to touch it or do tests in a virtual machine. We can edit this file so that it shows asterisks instead of blank spaces. So, we look for the line "Defaults env_reset" and add "pwfeedback". In such a way that the line would look like this:

Defaults env_reset,pwfeedback

Once we have written this, we press the Control + X key to save the changes we make, we press "Y" to save them and we close the file. Now, we reopen the terminal and we can carry out any order with the command «Sudo», you can see how now appears asterisks and no blanks, thus maintaining the security and privacy that characterizes Ubuntu and Gnu / Linux but being more practical for the administrator What do you think about it?


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  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.

  1.   gusmalav said

    Excellent