Sorry bro, Im finding it tedious manipulating 'date' command with 'last' command.. Here's a very simple one, as I've other urgent tasks at hand.
I don't have a unix system now to test this script.Pls execute and let me know.
!#/bin/ksh
for user in ` sed 's/:.*$//' /etc/passwd ` ; do
finger ${user} >> /tmp/logins
done
cat /tmp/logins|grep -v "bin|sys|adm|lp|smtp|daemon|uucp|listen|nobody|noacces|nobody4" >> /tmp/login-info
rm /tmp/logins
then have a look at the output to see which user has not logged in for some time.
from here onwards, you might want to see sorting the date column or grepping for a value.