-1

Twice now (in seven years) I have accidentally had my keyboard focus in the wrong window as I was typing my password, and accidentally entered it into a groupchat with dozens or hundreds of people. I deleted it in less than three seconds and nobody said anything on either occasion, but that's beside the point. This should never happen and both times I have felt ashamed beyond words, like I was a genuine idiot.

It's just that the shell doesn't show characters as you're typing a password, so if you're looking at the wrong monitor it's just so easy to not see the characters appearing somewhere else as you type, until you hit enter and realize nothing happened and look at your other monitor in dawning horror...

Is there any way to make absolutely sure this never happens? Like maybe drawing a red X near the terminal prompt whenever the window doesn't have focus, somehow?

closed as off-topic by gnat, IDrinkandIKnowThings, Dan, Abigail, Myles May 6 at 19:24

  • This question does not appear to be about the workplace within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    You've done this 2 times in 7 years. You were ashamed? How would anyone in the chat know that was a password? Even if they did, how do they know what it was for? You're making a mountain out of a molehill. – joeqwerty May 6 at 17:46
  • 10
    I'm voting to close this question as off-topic because it is not about navigating the workplace as described in the help center. – IDrinkandIKnowThings May 6 at 18:23
  • Can you explain exactly what OS, and tools you're using? Are you logging into a telnet/ssh terminal? Web browser? Etc. I'm reading over the answers and they're all over the place. With ssh you can auto login with some key gens if you want to avoid having to type passwords. – Dan May 6 at 18:47
  • 2
    This may be on-topic at Information Security. – David K May 6 at 19:32
  • Most platforms have third party applications to dim all windows except the one you're currently using - Compiz for linux, Hazeover for Mac, and Dropcloth for Windows as examples. This will make it more obvious where the focus is, and can also make it easier to focus on a specific window. – timbstoke May 8 at 15:00
7

Easiest solution: get in the habit of clicking in the window you're typing your password in.

FYI - your Slack admin likely keeps logs of all chats going on. You "deleting" your password likely just removes it from the chatroom view. It's probably still in the logs with a "deleted" flag or similar.

  • 4
    in any case, one should change the password after something like that. Obviously the evil hacker that saw the password before it got deleted won't say anything about it... – Frank Hopkins May 6 at 16:53
  • This is very true – Havegooda May 6 at 16:58
3

Many newer terminals seem to provide some feedback when you type a password, e.g. stars. You could look up and install one that does - if the terminal is your main point of entering passwords.

Also, I'm not using slack, but can you perhaps re-assign the send button? For instance, to SHIFT+ENTER. Solves the problem only if this is your main/only chat application or the same change can be made with the others too.

Update: As comments are temporary around here, a comment from OP:

For posterity, sudo visudo opens the config file for sudo on Linux/Mac, and then changing Defaults env_reset to Defaults env_reset, pwfeedback causes the shell to give me asterisks when typing in a password. Very helpful, good start.

  • 1
    You're right, password feedback is good. For posterity, sudo visudo opens the config file for sudo on Linux/Mac, and then changing Defaults env_reset to Defaults env_reset, pwfeedback causes the shell to give me asterisks when typing in a password. Very helpful, good start. – temporary_user_name May 6 at 16:58
2

Is there any way to make absolutely sure this never happens?

When you are done with Slack, minimize it so you cannot type in the input area unless you restore the Slack window. This mistake is not just limited to Slack, it could be any chat or communication app.

In short, be certain that when you are communicating with slack to focus on what your typing, and when your done, minimize it until you need to interact with it again.

0

I did some searching and I could not find anything that would draw an X on your terminal.

I think the solution here is just to be extra careful and click on the terminal just to be certain it's in focus.

0

Use a secure password management tool that auto-types passwords when it detects a login box. This way, you don't have to worry about typing them at all, much less typing them into the wrong window.

  • with many of these you still can accidentally shift the focus away to another window while it's typing the password in. Actually I've lost more passwords (partially) to the the wrong window due to such a password manager than by typing it in the wrong window (around 10 occurrences vs 0) – Frank Hopkins May 6 at 16:54
  • Sounds like you need to try a different password manager tool. The one I'm using right now locks the keyboard and mouse as it's entering the password specifically to prevent that. – dwizum May 6 at 16:56
  • might well be^^ Last time I checked all the keepass variants for linux had that problem, but I may have overlooked a setting... – Frank Hopkins May 6 at 16:58
  • 2
    Won't help in a command prompt shell that OP refers to. – Havegooda May 6 at 16:59
  • There are lots of password managers that work on the command line. – dwizum May 6 at 17:07
0

Are they able to see what you type as you type or are you pressing enter after entering the password into the chat window?

The way I do it is that I always click the "OK" button of any passcode window. That way if I type the password into the wrong window, I would see it as I would be focusing on the window where I would type the password and see that I did not type into the correct area.

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