Shell script for to view all users & groups history in root

Dear All,

I want to know all users & group history in one file, for root[administrator] terminal through shell or any other option

"All history" is a lot of data, which is not all captured. Do you want login, process starts, ???

Hi DGPickett,

I created one group.Group name Group1.Under group have 10 user.what is my think is i want know all 10 user history.Its possible to view particular user like /home/user1/.bash_history.But this is a big process.so i want all user history in one file through shell or any other option.please reply that if you know

Well, the bash history is what they typed into the shell, which may run many things.

I suppose you could hack an open source shell to syslog() every line they type into it. That does not help if they use a different shell. Similarly, you could modify the UNIX Kernel so it syslog()'d every exec*() call. If you turn on accounting, you may get such a report logged.

Generally, if you don't want people to run stuff, you give them a restricted shell or no login at all, just services or web pages!

Thanks DGPickett,

What i need is :

1. "root" should be accessed by only one person. [Now it is not like that:)]
2. "user" should have rwx access to any directory , which is permitted by "root"
3. The "root" need to get history used by "user"
4. And at last , "user" should not delete his own history at any cost..!!

The thing is , "root" want to track out all the commands running by "user".

Well, the user is writing shell history, but it wraps, and the user can destroy it, since they can write it. That is why I mentioned a syslog(), which sends off a message not recallable. I change my HISTFILE and HISTSIZE for more recall not deleted, and back up HISTFILE so I can recall more. But it is almost impossible to track a UNIX user's every execution unless you truss/tusc/strace init or the like. You might do it with a modified /lib/libc.so, if everyone uses the dynamic link. You are really talking about proprietary features added to UNIX. Even then, one might download static binaries and run them.