How to Show Asterisks While Typing Sudo Password in Linux

Introduction

On the Linux terminal, when a user runs the sudo command to get the super user privileges, for sure will be asked for a password, but no visual feedback is seen by the user while typing the password.

In this guide, we will show you how to show Asterisks (*****) while typing Sudo password in Linux.

Show Asterisks

  • There is no visual feedback as the password is typed when we tried to run the command dnf update with sudo as shown below:
sudo dnf update
  • Enable the password feedback feature in /etc/sudoers file, but first take a copy of the file.
sudo cp /etc/sudoers /etc/sudoers.txt
  • Open it for editing using the visudo command as shown
sudo visudo
  • In the file search for the following word:
env_reset
  • Then append pwfeedback to the end of line.
Defaults     env_reset,pwfeedback
  • It looks like this then save and quit.
  • Switch to the user in sudores.
su - unixcop
  • Try to run the command again.
sudo dnf update

Conclusion

That’s it..

In this guide, we showed you how to In this guide, we will show you how to show Asterisks while typing Sudo password in Linux.

Qadry
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

You might also likeRELATED

How to set PassivePortRange and PassiveIP in pure-ftpd on Ubuntu to secure the app!

Introduction Hi guys, We will talk about setting PassivePortRange and PassiveIP in pure-ftpd. If you run a firewall on your Linux server and want to...

Install Java 8 on CentOS 8

Hi Guys, In this guide, we’ll show you how to install Oracle’s Java 8 programming language on CentOS 8 . It's an object-oriented language...

How to install flameshot on RHEL/CentOS using Snapcraft

In this post, you will learn how to install Flameshot on RHEL / CentOS Flameshot is a powerful open source screenshot and annotation tool for...