Re: Check when a user last logged in?
- From: Jean-Pierre Radley <jpr@xxxxxxx>
- Date: Fri, 8 Aug 2008 16:22:26 -0400
Jeff Hyman typed (on Fri, Aug 08, 2008 at 10:11:49AM -0400):
| Assasin.x@xxxxxxxxx typed (on Thu, Aug 07, 2008 at 04:18:40PM -0700):
| | I'm trying to make a script that will remove/point out or delete old
| | user accounts. The problem is, I have no idea how to check when a
| | user last logged in!
| |
| | Checking the modification date of the home folder will not work
| | because there are many users that use the same home folder. I had
| | heard SCO has some sort of built in way of checking for this, or that
| | there is a unix command that can do it.
| |
| | Anybody out there able to help me out?
| |
| | Thanks in advance!
|
|
| # last user_name | head -2
| ... or ...
| # last user_name | head -2 | tail -1
Since the original poster is looking for "old user accounts", the 'last'
command is useless, because it will only provide login data for the
last one to seven days -- unless one has changed root's crontab to run
/etc/cleanup at some time other than early Sunday morining.
--
JP
.
- Follow-Ups:
- Re: Check when a user last logged in?
- From: Jeff Hyman
- Re: Check when a user last logged in?
- References:
- Check when a user last logged in?
- From: Assasin . x
- Re: Check when a user last logged in?
- From: Jeff Hyman
- Check when a user last logged in?
- Prev by Date: Re: Check when a user last logged in?
- Next by Date: Re: Check when a user last logged in?
- Previous by thread: Re: Check when a user last logged in?
- Next by thread: Re: Check when a user last logged in?
- Index(es):
Relevant Pages
|