Hiding history of my commands


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Hiding history of my commands
# 1  
Old 04-19-2012
Hiding history of my commands

i have several boxes running either ubuntu, redhat or solaris.

there are multiple people with root access on these boxes. i really dont like people looking through my command history, is there a way i can prevent this?

what files do i have to edit to prevent anyone from being able to see what commands i ran?

EDIT:

After months of searching, i finally found a way to hide my command history, even from root.

I just needed to create my own shell. It wasn't very easy. But it could be done, and it required quite a lot of creativity. Here's a very good article i found:

Prevent bash history - Bash prevent command history - Hide your bash unix history

Last edited by SkySmart; 10-10-2012 at 09:33 AM..
# 2  
Old 04-19-2012
You can't protect anything from root. And the usual tricks like making your history file empty and read-only wouldn't even seem to apply, root access overrides that...
# 3  
Old 04-19-2012
what if i have root access myself? about i not log any command i run?
# 4  
Old 04-19-2012
Any user with root or equivalent privileges can monitor anything he wants. Disabling shell history logging would be useless against a determined person.
# 5  
Old 04-19-2012
It still will not be hidden to other "root" users...
no history could be an option... but you punish yourself also...
# 6  
Old 04-19-2012
We make the root history file name unique by including the date, time and tty in the filename. We keep a month's worth of these history files because it can by quite handy to check what you or another administrator typed in a session should things go wrong. You can work out which are yours by checking your own login history.
# 7  
Old 04-19-2012
If you just need for different user's histories not to mix, methyl solution is fine.

If you don't trust other people using your machine and need full privacy on it, don't allow anyone else than you with root privileges on your machine.

Even using a shell that doesn't record the command history by design or by configuration isn't going to prevent a user with root privileges to monitor what you are typing in real time and store all commands you are executing somewhere.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Fc command does not display all commands history of a user

hi, i have an AIX6.1 machine and i modified a user's profile so that it creates history file for each ip address that connects with this user. the reason i did this is because more than 1 person connects with the same user so i want to keep track of command run by all of them. therefore, in the... (5 Replies)
Discussion started by: omonoiatis9
5 Replies

2. Shell Programming and Scripting

commands History

how to list all commands history for a username during a certain time ? Maany Thanks (2 Replies)
Discussion started by: Sara_84
2 Replies

3. Shell Programming and Scripting

history commands

Hi Guys, I am running RHEL5, I am trying to find out the history of the cammands that were executed on my server. I have files that are missing I just want to find out what happened to them. I used history | more but I can't find anything related to my query. I also checked... (1 Reply)
Discussion started by: Phuti
1 Replies

4. UNIX for Dummies Questions & Answers

Clearing history of commands executed

Hi, I have cleared the commands by using >$HOME/.sh_history. But if i issue HISTORY it shows some reference numbers but not the commands executed. But i want to truncate those line numbers too. May i know how i can achieve this? Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

5. UNIX for Dummies Questions & Answers

how to set top arrow to get the history of last used commands

guys can any one help me how to set top arrow to get the history of last used commands.I am using ksh (3 Replies)
Discussion started by: etldev
3 Replies

6. UNIX for Dummies Questions & Answers

How to review the history and the commands that has been done in this history?

Hello every body, Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris?? To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time. FYI I used... (5 Replies)
Discussion started by: ahmedamer12
5 Replies

7. UNIX for Dummies Questions & Answers

Using history of commands to save typing?

Hi, How do I add a history function to my shell? What I mean is if I have used the command: xemacs file.tex, I'd like to be able to type 'x' then use the arrow keys and go through all the commands I've done starting with an 'x'. Thanks! (3 Replies)
Discussion started by: pmasterkim
3 Replies

8. Linux

history of commands

I would like to log all the commands I type (on the terminal) to a file. The command "history" does this only for current terminal only. I typically keep around 10 terminals open. Thanks, j Note: I do not have root access. (2 Replies)
Discussion started by: superuser84
2 Replies

9. Solaris

History commands

Dear What's the command to be executed to retreive all history commands for a specific user? (1 Reply)
Discussion started by: abu_hassan
1 Replies

10. UNIX for Dummies Questions & Answers

Combining elements of different commands in history

What is the correct format for a single command that would combine portions of 2 different lines in the command history? I'm using a C shell. Here's a simplified command history to clarify: 4 rm file1 5 ls -ld file2 file3 file4 6 cat file 5 With the above history, what would be the... (5 Replies)
Discussion started by: Dbyte
5 Replies
Login or Register to Ask a Question