I want to check on log-in information, I follow some doc and add the following to the end of
echo "[$time]: $REMOTEHOST : $USER ." > /tmp/userlogin.log
mail -s "User Login !!" EMAILADDRESS < /tmp/userlogin.log
When I received the email, Subject reads OK.
However the body of the email contain only date time and user, the IP address it come from
Can anybody lighten me on this ?