Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Do you want to log the activity for security reasons? What prevents the users from deleting their logs? –  Kvisle Nov 8 '11 at 10:46
    
Flavor of linux? –  Bart De Vos Nov 8 '11 at 10:46
    
What are you trying to achieve ? –  Iain Nov 8 '11 at 10:49
    
There are times when myself or colleagues need to go back and see what the command they typed and what the output was at that point of time. Not for security reason. The file can be deleted. –  shantanuo Nov 8 '11 at 11:15
add comment

2 Answers

up vote 2 down vote accepted

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
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.