Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Feedback when typing password at a sudo prompt

Writer Matthew Harrington

When I type in my password at a sudo command line prompt, I would like to see a "*" for each keystroke. How do I do this?

2 Answers

On some UNIX-based systems, sudo can show an asterisk (*) when you type a letter.

In the terminal, enter...

sudo visudo;

Type your root password in (you won't see any visual feedback yet) and hit Enter.

Now, find the line that reads:

Defaults env_reset

And replace it with:

Defaults env_reset,pwfeedback

Finally save and exit the file. Assuming you are using vi, that command is:

:wq!

and then press Enter.

sudo should now be set up correctly. To test, open up a new terminal and type this to reset the sudo timeout.

sudo -k;

Now try it out.

sudo ls;

Source:

0

You can enable visual feedback when typing passwords by editing your /etc/sudoers file and changing the Defaults line to read:

Defaults env_reset,pwfeedback

Example:

screenshot

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy