When entering a password into the password field in a Linux terminal- the password is just in the clear!
This is a commonly known fact.
But what if I'm in public, like in an office, and need to enter my password, regardless of the reason, but that annoying colleague is just staring at my screen, waiting!?
Couldn't the developers have made some kind of feature that works something like: press Ctrl+*
, and then whatever I type next is obscured by bullet points or asterisks?
Is the reason that something like this isn't implemented into the terminal because:
- The devs didn't think of this (unlikely)?
- There's a reason why this can't be implemented into terminals?
- They just don't see the need?
Because personally, although this isn't a common occurrence, I feel pretty uncomfortable whenever I have to do it in public!
Now, there are many tools that people have made to help with this, such as:
https://stackoverflow.com/questions/55766607/hiding-password-field-in-command-line
And
https://www.tecmint.com/show-asterisks-sudo-password-in-linux/
But, the thing is, these require installed tools, which I wouldn't have a problem with installing, but what if I am using a work system that doesn't allow or want unauthorized programs installed. Also, the general gist I am getting with these programs is that some of them require you to pre-enter your password into them, which poses even bigger security flaws.
But I am asking this question because I want to know why something like the Ctrl+*
feature isn't around, as implementing something as small as this seems like it would have such a big benefit, I think.
As a side note, Adam Katz talks about a 9-bullet-point-password, where obscurity would come in handy. Maybe in this case, and this case only, I might take their suggestion up!!
stty -echo; read -r password; stty +echo
to hide the entry.