4 ms·
yeah i wonder how many passwords are stored in there in free text format
by Sealy 11y ago
yeah i wonder how many passwords are stored in there in free text format
- leni536 11y agoecho "Password: "; read -s pass; stuff --pass "$pass" Where stuff takes password as an argument. Alternatively you can start your line with a space character and it isn't stored in your history.
- tempestn 11y agoCool, did not know that about the leading space.
- dr4g0n 11y agoDo be aware though that this only works if HISTCONTROL is set to 'ignorespace' or 'ignoreboth' (for bash anyway). For zsh, you need to have HIST_IGNORE_SPACE set.
- bratch 11y agoThe leading space behaviour is true only if HISTCONTROL="ignorespace" is set.
- leni536 11y agoDid not know that, for me HISTCONTROL=ignoreboth is set in my .bashrc. I think Debian's adduser creates a default .bashrc file where this line is present, I'm not sure though.
- tome 11y agoI believe that command-line parameters are available for all to see in the output of ps, so typing parameters on the command-line is a bad idea anyway.