Re:“I have [bash] history back to ~2003”
by Sealy on Thursday September 03, 2015 @05:14AM
(#10163954)
yeah i wonder how many passwords are stored in there in free text format
[ Parent
| on HN ]
Re:“I have [bash] history back to ~2003”
by leni536 on Thursday September 03, 2015 @05:32AM
(#10163989)
echo "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.
Re:“I have [bash] history back to ~2003”
by bratch on Thursday September 03, 2015 @05:52AM
(#10164048)
The leading space behaviour is true only if HISTCONTROL="ignorespace" is set.
Re:“I have [bash] history back to ~2003”
by leni536 on Thursday September 03, 2015 @05:58AM
(#10164065)
Did 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.
Re:“I have [bash] history back to ~2003”
by tempestn on Thursday September 03, 2015 @05:44AM
(#10164023)
Cool, did not know that about the leading space.