LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-30-2003, 10:07 AM   #1
skewer
LQ Newbie
 
Registered: Feb 2003
Location: UK
Distribution: Mandrake 9.0
Posts: 11

Rep: Reputation: 0
Wiping bash command history?


Hi all

I've just noticed how my password is stored as a bash command accessible via PgUp in a terminal (well, via Ctrl+Alt+F1 at least). I presume the command history can be deleted, but mine has many commands from weeks ago and I'm worried about the security implications. Sure, it's not like I have heaps of bank data or anything, but if I vanish to the bathroom there's a risk someone could get the password & leave no trace.

Cheers,
SQR
 
Old 07-30-2003, 01:28 PM   #2
lfur
Member
 
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30
If you wanna wipe out the history file (in BASH):
> .bash_history

If you wanna preserve some lines, you can do:
Code:
tail --lines=number .bash_history > .bash_history.tmp; mv   .bash_history.tmp .bash_history
But I don't know how you managed to get your passwords in you history file. Or maybe I just don't understand your problem.
 
Old 07-30-2003, 01:45 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Or:
history -c
 
Old 07-30-2003, 03:33 PM   #4
skewer
LQ Newbie
 
Registered: Feb 2003
Location: UK
Distribution: Mandrake 9.0
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks lfur

I don't know how the password got there either, but it did. I'll try your stuff as soon as I get offline, and I might repost here if I find out how it occurred (if I can replicate the situation someone might have a prevention for it, rather than a cure...)

Cheers,
SQR
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
history not working in bash subu_s AIX 2 12-29-2004 01:49 PM
bash history slowly Linux - General 2 11-12-2004 12:35 PM
F8 for command history in bash titanandrews Linux - General 7 10-15-2004 04:25 PM
Bash History ukndoit Linux - Security 2 10-16-2003 10:02 AM
bash command history problem crabboy Slackware 1 10-17-2002 08:55 PM


All times are GMT -5. The time now is 03:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration