Attempting to monitor root access w/ the following command -
[root@prematics32 ~]# echo 'ALERT - Root Shell Access on:' `date` `who` mail -s "Alert: Root Access from `who cut -d"(" -f2 cut -d")" -f1`" user@example.com
Receive the following error:
who: invalid option -- (
Try `who --help' for more information.
ALERT - Root Shell Access on: Fri Aug 20 13:28:45 EDT 2010 micore pts/1 Aug 20 11:03 (172.16.192.82) mail -s Alert: Root Access from user@example.com
Does anyone know what 'who' parameter is triggering this error and what the proper syntax should be?
[root@prematics32 ~]# echo 'ALERT - Root Shell Access on:' `date` `who` mail -s "Alert: Root Access from `who cut -d"(" -f2 cut -d")" -f1`" user@example.com
Receive the following error:
who: invalid option -- (
Try `who --help' for more information.
ALERT - Root Shell Access on: Fri Aug 20 13:28:45 EDT 2010 micore pts/1 Aug 20 11:03 (172.16.192.82) mail -s Alert: Root Access from user@example.com
Does anyone know what 'who' parameter is triggering this error and what the proper syntax should be?