News for hackers. Stuff that matters.
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by nmrm on Saturday April 12, 2014 @11:03AM (#7578018)
$> some_command --username myusername --password mypassword

$> history

...

12345 some_command --username myusername --password mypassword

This comes up fairly often with poorly designed CLI's. Wiping your bash history after running the command isn't an unreasaonble hack.

Edit/Addendum: Although there are other (perhaps better) ways to achieve the same effect, the main point is that doing a "history -c" should be considered no more suspicious than e.g. closing a document to clear your "undo" history.

Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by zx2c4 on Saturday April 12, 2014 @11:08AM (#7578036)
Fair enough. Though,

    read -p "Password: " -s password; some_command --username myusername --password "$password"
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by 0x0 on Saturday April 12, 2014 @11:58AM (#7578172)
Although this avoid a .bash_history entry, this will still make the password visible to "ps ax" on most multi-user systems.
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by NoodleIncident on Saturday April 12, 2014 @11:14AM (#7578049)
A space before the command stops it from going in your history, though.
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by ewams on Saturday April 12, 2014 @11:31AM (#7578088)
is that only for certain distro's because that isnt true on debian:

115 history

116 history (1 space)

117 history (2 spaces)

118 man passwd

119 passwd -a (1 space)

120 history

121 passwd -a (2 spaces)

122 history

Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by puls on Saturday April 12, 2014 @11:40AM (#7578121)
You can control this with the HISTCONTROL and HISTIGNORE environment variables: http://askubuntu.com/questions/15926/how-to-avoid-duplicate-...
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by judk on Saturday April 12, 2014 @01:41PM (#7578519)
Thank you for providing something of technical value in this conversation.
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by dfc on Saturday April 12, 2014 @12:16PM (#7578236)
Much to my dismay this is not true. By default debian is configured to `ignoreboth` ie dupes and spaces. Like you I also change the debian default for HISTCONTROL. Lines 11-13 of /etc/skel/.bashrc:[^1]

  # don't put duplicate lines or lines starting with space in the history.
  # See bash(1) for more options
  HISTCONTROL=ignoreboth

[^1]: https://bazaar.launchpad.net/~doko/+junk/pkg-bash-debian/vie...

Provenance for /etc/skel/.bashrc:

  dfc@ronin:~$ dlocate /etc/skel/
  bash: /etc/skel/.bash_logout
  bash: /etc/skel/.bashrc
  bash: /etc/skel/.profile
  dfc@ronin:~$ apt-cache showsrc bash |grep ^Vcs-
  Vcs-Browser: https://code.launchpad.net/~doko/+junk/pkg-bash-debian
  Vcs-Bzr: http://bazaar.launchpad.net/~doko/+junk/pkg-bash-debian
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by paxswill on Saturday April 12, 2014 @11:39AM (#7578114)
It's controlled by the HISTCONTROL variable in bash. If it contains 'ignorespace' (or 'ignoreboth' to ignore duplicates as well). Check the man page for more details.
Re:Excerpt from ‘Flash Boys’ about Serge Aleynikov and Goldm... by judk on Saturday April 12, 2014 @01:43PM (#7578526)
Anyone know why this incredible hack was introduced in hr first place? In my entire career this "feature" had only caused annoyance after copy-pasting a command.

Why not have a shell command called 'nohist' to wrap a command line?