🔍 See Original Answer on Ask Ubuntu 🔗
How can I make stars appear when I type sudo password?
December 15, 2016
November 24, 2022
Copy to clipboard: false
sudo at the Terminal if you want stars / asterisks to appear with each password character you type you need to configure it using:
Locate the line containing
env_reset and add the parameter
, pwfeedback behind it. Here is an example:
GNU nano 2.5.3 File: /etc/sudoers.tmp Modified # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset, timestamp_timeout=120, pwfeedback Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos ^Y Prev Page ^X Exit ^R Read File ^\ Replace ^U Uncut Text ^T To Spell ^_ Go To Line ^V Next Page
After making changes save the file using Ctrl+O to write the file. You will be prompted for the file name but simply press Enter to accept the default. After saving, exit the editor using Ctrl+X.
Also on this example the timeout value has been set to 120 minutes (2 hours) so that you aren’t constantly prompted for
sudo password every 15 minutes. You can leave this option out if you like or increase / decrease it as you like.