In debian wheezy terminal I type

su -

It ask for password, which I type but it doesn't show anything as


I want to it to show at least some asterisks as the placeholder for the password characters as follow:

Password: ************

There is a way to do it with "sudo" but it does not work with su... But if you want to display "*" with sudo, you need to add this line in "/etc/sudoers" file :

Defaults pwfeedback
  • That did not work for me i did visudo then inserted Defaults pwfeedback which failed then i inserted Defaults pwfeedback="*" which also failed. Any idea ... – Nishan Aug 21 '13 at 13:14
  • Did you tried with "su" or "sudo" ? – Junior Dussouillez Aug 21 '13 at 13:16
  • BOTH sudo apt-get install vlc -- FAILED su - as said by you FAILED too – Nishan Aug 21 '13 at 13:34
  • That's weird, it's working for me with sudo, I added the line at the end of my sudoers file. You can also add it elsewhere. For example, after env_reset -> "Defaults env_reset, pwfeedback". – Junior Dussouillez Aug 21 '13 at 13:39
  • i added it after Defaults secure_path="", however thank you very much for your sincere efforts. – Nishan Aug 21 '13 at 13:51

Is there something that can be done about this?

No, unfortunately. It's an inconsistency in the interface (visual feedback in the GUI, no visual feedback in the terminal), and inconsistencies confuse new users.

I started a thread about this in the Ubuntu Forums called Feedback on entering password in the terminal? I even filed a bug report on the issue, but the developers have rejected it.

So, you've just got to get used to it.

from http://www.psychocats.net/ubuntu/passwordinterminal

  • It is a security feature and intentional. Giving away the amount of characters the password consists off is already a valuable information for anyone trying to guess it. – Jan Henke Sep 6 '16 at 11:07
  • If you really want to implement that, look at the line discipline implementation in the kernel; it won't be hard to hack eg an ECHO_STAR termios c_lflag in, that could be then easily used by any program (I won't comment whether this is a good idea or not). Otherwise, I don't see how playing the UX pundit is helping anyone -- you cannot expect every program that has to get a password from the user to do its own idiosyncratic workarounds. – Uncle Billy Jan 29 at 1:17

You can run stty echo </dev/pts/N from another window, where /dev/pts/N is the terminal you're running su in (get its name with tty before running su).

You can probably bind a key to that in your terminal emulator -- I'll leave that as an exercise to the reader.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.