The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-25-2007
jgt jgt is offline
Registered User
  
 

Join Date: Apr 2007
Location: 44.21.48N 80.50.15W
Posts: 425
Is there a ".lastlogin" file in the users home directory. If this exists it has a size of 0 and its mtime is equal to the last login time.
So presumably:
find / -name .lastlogin -mtime +40

If it doesn't exist you could add "touch .lastlogin" to each user's .profile
and wait 40 days for the first occurence