How to Redirect Local User Historys ?
Hi all
I am Using RHEL 5.4 Box., I would like to redirect my Local users histories ( /home/.bash_history) to /root/users_history file.. Is it possible to redirect ?? Guyz , Please suggest me your ideas!! Regards Bala |
The problem is root's home dir is
Code:
dr-xr-x---. 17 root root 4096 Nov 28 17:27 root Code:
-rw-r--rw-. 1 root root 0 Nov 28 17:27 t.t Code:
echo 'test' >/root/t.t Why would you want this anyway? |
Quote:
Chris Good., I know very well that its very bad to redirect to /root/ , Here that Destination(/root/user_history) file is doesn't matter .. i would like to know is it possible to redirect, if its possible then how ? Chris ., pls suggest me is it possible to redirect that histories to some where ? Regards Bala |
You could probably symlink them to /tmp, but I'm not sure you wouldn't have issues if you try to put them all in the same file.
Again, why do this? |
Quote:
Thanks ., Here I have a order to save all Local user history's, that is why i am going on this ... here i am going to redirect all local users history's to each file under /tmp ., is symlink method will helpful for this ? is there any other way to redirect ? Once again thanks Chris ! Regards Bala |
Well it'd be easier to just create a cron job to back them up every day.
Note that the user has to be able to write to the history file, which also means that he can empty them. This is not a secure way of tracking the user. If you are after a secure method, you could have a look at rootsh http://sourceforge.net/projects/rootsh/ |
Quote:
Yes chris., that is happening here .. some users deleting their history's very often .. what should i do ? how to redirect the user history's in effective manner ? Regards bala.linuxtech |
As I said, look at rootsh
|
Quote:
Thanks Chris |
All times are GMT -5. The time now is 10:25 PM. |