I want to know which user executed which command on terminal and when i.e. if any of the user does "rmdir abc" and removes a specific directory , i should know which command he executed and at what time.And i don't want it for a single session, this data should be available to me like we maintain logs, so that i can analyze it for any point of time.
I tried the
history command as well and also added time to it but it does not show "Users" of the command and also it is session based ,so it's data does not get appended to
~/.bash_history file unless the session is exited. Also
~/.bash_history does not show time and user so it's not usefull.Can anyone help me please.I just want to see which user executed which command from the moment the system is started and at what time.