Date: Thu, 8 Jul 2004 13:38:25 -0400 (EDT) From: <login@istop.com> To: <freebsd-questions@freebsd.org> Subject: Logging user root activities Message-ID: <20040708173825.B8F0A17D4F8@smtp.istop.com>
next in thread | raw e-mail | index | archive | help
Sysadmins: I am developing a habit of keeping a record what I am doing on the system. The best solution I have come with to run script(1) in the .login file. Here is the line in the .login: /usr/bin/script -q $HOME/adminlog/`last | head -1 | awk '{print $3}'`- `date "+%Y-%m-%d-%Hh-%Mm-%Ss.log"` It create a file ip.add.re.ss-2004-07-08-13h-03m-59s.log in the $HOME/adminlog directory. I guess that I need to know my IP, date and time and activities. This works ok this far. The only thing I can not avoid is to have two times control-D when I need to exit the system as said even in the man of script(1), see below: "The script ends when the forked shell (or command) exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-D (if ignoreeof is not set) for the C-shell, csh(1))." How other admins are doing to have a record of their activities while on the system? I looked on ports in the sysutils and could not find port matching this object. S. Mohammad [login@istop.com]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040708173825.B8F0A17D4F8>