I need some help with this script
It errors out on the third line: syntax error at line 3: '(' unexpected
Thanks for any help
#!/bin/sh
for id in 'awk 'FS=":" {if(($3 == 0 && $1 != "root" )) print $1}' /etc/passwd'
do
mail -s "Root Access Alert" root@rocket.foo.com << EOF
############################################################
#
# Alert Login ID 'echo ${id}' has uid 0
# 'date "+Detacted On Date :%D Time :%r"'
#
#
############################################################
EOF
done
It errors out on the third line: syntax error at line 3: '(' unexpected
Thanks for any help
#!/bin/sh
for id in 'awk 'FS=":" {if(($3 == 0 && $1 != "root" )) print $1}' /etc/passwd'
do
mail -s "Root Access Alert" root@rocket.foo.com << EOF
############################################################
#
# Alert Login ID 'echo ${id}' has uid 0
# 'date "+Detacted On Date :%D Time :%r"'
#
#
############################################################
EOF
done