Results 1 to 4 of 4

Thread: Deleting bash (Konsole) history

  1. #1

    Default Deleting bash (Konsole) history

    Hi,

    this isn't a question but a warning with a possible answer.
    Yesterday evening I had some houseworking task to do on my system. As it was late I typed in more or less blindly and quickly (into the Konsole terminal):

    su -
    followed by enter and the root password and enter again.

    Unfortunately, I didn't really watch what I was doing and I didn't really hit the enter key after the "su -" command.

    So what I actually typed in was "su - <root_password>" and enter.
    Logically, the system told me that user "<root_password>" doesn't exist.

    The problem with this was though, that the <root_password> was now visible on my screen - and, more annoyingly, I could call up this line with the "up" keystroke, which brings up the history of lines typed into Konsole.

    So anyone with access to the machine could have checked the bash history and gotten at my root password.

    The only way to stop this I could find was to delete (or edit) the ~/.bash_history file in my home directory...
    (editing may be hte better choice, perhaps the file gets totally overwritten on the disk, though I'm not sure).

    I thought I'd share this little mishap.

    Lenwolf

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Deleting bash (Konsole) history

    history -c

    and then perhaps also remove the history file, in case it was already committed to disk.

  3. #3

    Default Re: Deleting bash (Konsole) history

    Quote Originally Posted by ken_yap View Post

    and then perhaps also remove the history file, in case it was already committed to disk.
    Yes, thanks, that's indeed what I did.

    Lenwolf

  4. #4
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,453

    Default Re: Deleting bash (Konsole) history

    The same tip applies to .mysql_history. I regularly edit both of them to remove everything except a handful of commonly used commands which I can recall using the up arrow key.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •