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:
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...
Any user with root or equivalent privileges can monitor anything he wants. Disabling shell history logging would be useless against a determined person.
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.
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.
I would recommend preventing anyone having root access to the server except those you trust entirely. If you have people that can justify a need to run certain commands as root, then you should look at the sudo command, freeware available from Sudo Main Page
Basically, if you can't trust them entirely, keep them off. What would mean they need root access anyway? Can they really justify full access or is it just laziness that they can't work out how to do something properly. You are allowing them to destory your server if they remove certain files, devices, shutdown, kill processes etc. etc.
I hope that this helps
Robin
Liverpool/Blackburn
UK