Hi All,
I want to write a script that will send the alert when linux server password expiry for user 'x' is less than 12 days.
I have written the below script but this is not working for expiry date 04 july
script;-
P_EXPIRY_DATE=`chage -l msdp| grep 'Password expires' | awk ' { print $5 }' | cut -c1,2`
T_DATE=`date '+%e'`
P_EXPIRY_DAYS_LEFT=`expr $P_EXPIRY_DATE - $T_DATE`
if
then
condition
else
condition
fi
Any help will be really appreciated !!!!!!!