The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do i change to super user then revert back to ordinary user ,using shell script? wrapster Shell Programming and Scripting 3 06-04-2008 04:11 AM
User Info s_dhar UNIX for Dummies Questions & Answers 1 01-08-2008 04:05 AM
getting user info on a file Quesa UNIX for Dummies Questions & Answers 1 04-07-2006 04:30 AM
Other than root user .Normal user is unable to create files mallesh UNIX for Advanced & Expert Users 1 06-22-2005 09:18 AM
? on xferring user info from one sys to another kymberm Filesystems, Disks and Memory 6 10-28-2002 06:07 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-13-2002
Registered User
 

Join Date: Aug 2002
Location: California, USA
Posts: 27
User log in info

Hi,
I am using SunOS and HP-UX. I am trying to removed user that has not been using the system for a period of time. Is there anyway to find out how long since the last time the user logged on. I know there is command "last" that read from the file /etc/wtmp that hold some of information. However, information is deleted as the file get too large.
Besides of that way, is there anyother way?
Thanks in advance,
Vu
Forum Sponsor
  #2  
Old 08-13-2002
Registered User
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
A couple of workarounds here, but ideally you would want to use the last file.

You might want to think about truncating the last file upto a certain period instead of removing the whole file - that way you'd always have enough data in there to assess whether you want to delete or not.

Or you could find a list of .profile files that were last accessed greater than a certain period of time....

Or you could add a variable to the .profile file for each user that sets say 'last_accessed=date'. Then you could parse the .profile files and find ones that have old dates. Each time a user signed in the variable would be updated - so if it's an old date it means they haven't logged in for a while.
__________________
Pete
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0