LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-07-2007, 03:17 PM   #1
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Rep: Reputation: 15
Where's my bash history?


It may be a simple question I know, but I am working through a terminal on AS 2.1. I have always worked on "desktop" linux systems and don't have a /home directory. Where are user's .bash_history files stored on this server?
 
Old 02-07-2007, 03:26 PM   #2
digen
Member
 
Registered: Dec 2005
Location: India
Distribution: Ubuntu Feisty Fawn
Posts: 107

Rep: Reputation: 15
They are stored inside the user's home directory. For example the superuser root's bash_history file could be found at the location /root/.bash_history.

Please note the file .bash_history is a hidden file. You will need to provide the "a" argument to ls in order to view files starting with a period "."

Quote:
#ls -al
Or if you are trying to view it through a graphical file manager you will need to enable something like "Show hidden files and directories" from it's menu.
 
Old 02-07-2007, 03:28 PM   #3
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Original Poster
Rep: Reputation: 15
hmm, so maybe my next question is, how do I know where my home directory is?
 
Old 02-07-2007, 04:36 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Typing echo $HOME in a terminal window usually gives the answer to that question.
 
Old 02-07-2007, 04:54 PM   #5
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Original Poster
Rep: Reputation: 15
thanks. Basically, my account has been compromised and malicious commands executed on the server. It doesn't look like the history file gives any kind of detailed information I need though, and other log files were deleted. So I guess I'm going to have to live with the fact that management thinks I screwed up, then tried to cover it up.
 
Old 02-07-2007, 05:20 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
By other log files, do you mean all of the info in /var/log?

Have a look through the info here at http://www.linuxquestions.org/questi...ad.php?t=45261. A good one to start with is CERT's Intruder Detection Checklist. I'd also recommend http://www.cert.org/tech_tips/root_compromise.html
 
Old 02-07-2007, 06:35 PM   #7
subnet_rx
Member
 
Registered: Oct 2001
Distribution: Ubuntu 9.10
Posts: 148

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by gilead
By other log files, do you mean all of the info in /var/log?

Have a look through the info here at http://www.linuxquestions.org/questi...ad.php?t=45261. A good one to start with is CERT's Intruder Detection Checklist. I'd also recommend http://www.cert.org/tech_tips/root_compromise.html
Thanks, I'll definitely look through that. Yes, files in /var/log, several that I didn't know existed or would know to delete. I am a web programmer so I know about web server security from a programming standpoint, but only dabble in Linux server administration. The problem is, my access has been yanked down to nothing, so I can't run half of those commands. They basically told me if I want anything on the server now, I have to hand it to an admin and he'll put it on for me. The server is fairly insecure in my opinion though (I just signed on), so I'm sure that I will be able to investigate some of this with my read access to virtually every file on the server.

Last edited by subnet_rx; 02-07-2007 at 06:37 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need someone to look into this bash history bytez Linux - General 7 10-16-2006 10:26 PM
bash history jasonnth Linux - Software 7 08-08-2006 01:35 AM
problem with (history) in bash Guru Mind Programming 10 03-22-2006 12:07 AM
bash history slowly Linux - General 2 11-12-2004 11:35 AM
Bash History ukndoit Linux - Security 2 10-16-2003 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration