we have a requirement to log all our contrators terminal sessions (in solaris) remotely
I can add this to their .profile:
exec /usr/bin/script /path/to/logfile
and then send the logfile but is it possible to do it in one command? Something like
/usr/bin/script /tmp/outfile | mailx -s "whatever" whoever@wherever.com
Obviously I've tried that example and it didn't work... do I need some fancy redirection or a combination with tee or something?
Any ideas?
I can add this to their .profile:
exec /usr/bin/script /path/to/logfile
and then send the logfile but is it possible to do it in one command? Something like
/usr/bin/script /tmp/outfile | mailx -s "whatever" whoever@wherever.com
Obviously I've tried that example and it didn't work... do I need some fancy redirection or a combination with tee or something?
Any ideas?