0

I add the following line to my bash_profile file to log all my activities.

script ~/mylog_$(date '+%Y%m%d%H%M').log

If I have 100 users, I can not modify all the user accounts with the change mentioned above. Is there any way Linux (centos) will do it automatically? I tried the audit deamon :

/etc/init.d/auditd start 
/etc/init.d/psacct start

But none of it does what I can do by editing bash_profile file.

Bart De Vos
  • 17,911
  • 6
  • 63
  • 82
shantanuo
  • 3,579
  • 8
  • 49
  • 66

2 Answers2

3

pam_tty_audit PAM module logs everything, including individual key strokes. Is that too much detail for you? aureport can then generate human-readable reports for you, for example

aureport --tty -ts today
Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
0

use sudosh or ttyrec. the command you gave would not work and will create lot of complications for you in future. use the right tool at right place.

Also check : Logging a "persons" activity in Linux

Farhan
  • 4,269
  • 11
  • 49
  • 80