- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Show Asterisks While Typing Sudo Password in Linux?
When we use sudo along with a command, we are required to give the password in the next step. But when we start entering the password, we do not see anything displaying on the screen. The screen after the colon symbol remains blank. It creates a difficulty in knowing, how many characters we have entered. In thei article we will see how we can display asterisks for every character of the password entered.
The below screen shows a command with sudo clause to copy a file. As you can see the screen asks for password but nothing is displayed when the password is entered.
$ sudo cp /etc/sudoers /etc/sudoers.bak [sudo] password for ubuntu:
Edit the sudoers
Next we edit the /etc/sudoers file and add pwfeedback. This makes the asterisks visible when the password is enetered. After the file is edited and saved, we type reset command for the effect to take place.
Run sudo Again
Now when we run the same cp command again involving sudo, we see that the asterisks appear when we put the password.
$ sudo cp /etc/sudoers /etc/sudoers.bak [sudo] password for ubuntu:******
- How to count number of characters in EditText while typing in android?
- How to count number of characters in Text box while typing in iOS?
- Reset Kali Linux Password
- How to Force User to Change Password at Next Login in Linux?
- Accessing The Unix/Linux password database (pwd)
- Resetting a Root Password in Linux without External Media
- How to show all shared libraries used by executables in Linux?
- Changed SAP password not working while resetting using BAPI
- How to Autocomplete a Textbox When Typing in Excel?
- How to show historical and statistical running time of linux systems
- How to verify the password entered in the JavaFX password field?
- Usage of Asterisks in Python
- How to Autocomplete When Typing in an Excel Dropdown List?