40

When I'm about to install a program in the terminal it wants the password:

[sudo] password for xxx:

But when I start to type my password nothing happens. What should I do?

3

8 Answers 8

50

Even though no characters appear when you type your password, you are actually typing your password.

So type password, then hit Enter and see the magic.

38

For security reasons there is no feedback of passwords given in the terminal. Read the following discussion on reasoning behind this and why this will not be implemented:

In this discussion, and also given in the answer to a corresponding question at superuser

There is an option to enable password feedback for sudo and only for sudo by editing options in the sudoers file.

Warning: The instructions below are for advanced users only. If something goes wrong when editing the sudoers file, and this file is inaccessible or malformed you will have effectively locked out yourself and any other administrator users of performing any administrative tasks in your system. It is not a good idea to do this on a productive system.

To enable password feedback by asterisks * when running the sudo command we have to edit the sudoers file with

sudo visudo

We then will have to add pwfeedback to the default options as shown below:

Defaults        env_reset,pwfeedback
1
  • Edit a typo out of the password; not possible IMHO. But you can restart the typing; just hold CTRL and hit u (clear / cancel all the typing you have done)-
    – Hannu
    Jan 6, 2023 at 11:39
21

Passwords are hidden so no-one can see over your shoulder when you enter it. It's a security measure.

8

Password is not shown when you write it in the terminal after the sudo command but it is still read. Is this the case here? i.e. have you tried to give your password and press Enter?

7

Nothing is supposed to happen, just type the password and hit Enter.

7

When using the terminal, for security reasons (Like if someone is standing just behind you and has nothing else to do but stare at your screen while you type a password) you will never see your typed password. You are effectively typing it even if you don't see it.

So just type your password and press ENTER

enter image description here

Here I am checking one of my drives. As you can see, it would look like I did not type my password but I indeed have.

0
4

Don't worry, it is a common and positive behavior.

Because the output of any software can be logged to a permanent storage (like the hard disk) in a format readable by humans, the Linux libraries used by most terminal softwares (in your case the login utility with the PAM system) have a security feature that hides the passwords from the screen: the password is memorized and - if the software is well made - encrypted in memory when you press RETURN but even while typing the output does not arrive to the standard output.

This both prevents passive screen logging and people near you from catching the password. Have a nice day and remember to type quickly, because anyone can still see your physical keyboard! :-)


Important: when you see a password field, insert the root password only if the application is trusted; never publish or save your root password, even if the password field seems secure and does not show any letter.

4

For security reasons, characters typed in at the password request prompt are not echoed back to the terminal.
Type your password and hit enter. The characters are there, you just can't see them, that's all.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .