![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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 |