Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'How to Obscure Command Line Passwords' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to Obscure Command Line Passwords
Authored by: SOX on Jul 06, '10 03:05:48PM

<i>First: If you start a command with a space, it's not entered into the scroll-back history, or the shell history. So that problem disappears</i>

??? this is not true on my computer.
% history
196 export PASSWORD=foberry
197 history

The code is just showing a possible implementation of the general idea that you can load a password by indirection of a script. Any way is fine, the point of doing it with perl is that this versatile language allows you do more complicated things if you need to.

[ Reply to This | # ]
How to Obscure Command Line Passwords
Authored by: fds on Jul 06, '10 03:46:52PM

It's an option. Your HISTCONTROL environment variable has to contain ignorespace.

For example,
export HISTCONTROL=erasedups:ignorespace

[ Reply to This | # ]