0

Possible Duplicate:
How to log every linux command to a logserver

I want to log the commands executed by all users on the server. Is there any better way than using script command?

nitins
  • 2,579
  • 15
  • 44
  • 68

2 Answers2

0

A possible application to do this is rootsh. see: http://sourceforge.net/projects/rootsh/

Be careful though, you will be capturing all sorts of passwords, confidential data and other things that need to be stored in the highest security you have available. Think of what could happen if this information was captured. Also, depending on the number of users on your system there could be a lot of data.

smarthall
  • 138
  • 6
-2

That should be contained under history for each of the users or under /home/$username/.bash_history where $username is the name of the actual user, of course if the user home directory is not under home that it will be like /path/to/homedir/.bash_history

Logic Wreck
  • 1,420
  • 9
  • 8
  • 1
    history -c ; export HISTFILE=/dev/null; do stuff; exit. The information only gets written to $HISTFILE when the user exits cleanly. – user9517 Sep 06 '12 at 10:54