When you run a command using sudo in Linux, the Terminal prompts you to type in your password with no visual feedback as you type. I will show you how to make password visible as asterisks (*) when you are entering your password in the terminal window in Linux flavors of the operating system.
1 Step
run sudo visudo command
We will open the “/etc/sudoers” file and change a setting to customize the length of the grace period.
Open a terminal window by pressing Ctrl + Alt + T and type below given command. Type your password when prompted and press Enter. Notice that no asterisks (*) are displayed when you enter your password.
$ sudo visudo
IMPORTANT: Never edit the sudoers file with a normal text editor. Always use the visudo command as described here. If the sudoers file has improper syntax, you will be left with a system where it’s impossible to obtain elevated or root privileges. The visudo command opens a text editor like you would with normal text files, but the command also validates the syntax of the file upon saving it. This prevents configuration errors in the sudoers file from blocking sudo operations, which could be your only method of obtaining root privileges.
$ sudo visudo
IMPORTANT: Never edit the sudoers file with a normal text editor. Always use the visudo command as described here. If the sudoers file has improper syntax, you will be left with a system where it’s impossible to obtain elevated or root privileges. The visudo command opens a text editor like you would with normal text files, but the command also validates the syntax of the file upon saving it. This prevents configuration errors in the sudoers file from blocking sudo operations, which could be your only method of obtaining root privileges.
2 Step
move the cursor to the end of env_reset
A file opens directly in the Terminal window using the Nano text editor. Use the arrow keys on your keyboard to move the cursor to the end of Defaults env_reset see in below given image,
3 Step
add pwfeedback to the end of env_reset
Change the line by adding ,pwfeedback to the end of the line as env_reset,pwfeedback see in below given image.
4 Step
Save the changes
Once you have made above given changes, press Ctrl + X and type a “y” in response to the question that displays at the bottom of the window to save your changes.
5 Step
Press Enter
You will be asked for the File Name to Write at the bottom. Press Enter to accept the default.
NOTE: You must close the Terminal window and open it for the change to take place.
NOTE: You must close the Terminal window and open it for the change to take place.
Comments
Post a Comment