Run sudo visudo to open the sudo configuration file in the default text editor.
sudo visudo
Find the line that reads:
Defaults env_reset
Change it to:
Defaults env_reset,pwfeedback