you could probably do it with perl
just finger <username> and pipe the output into a perlscript that compares
the last login date to today's and check to see how stale it is.  if it's
like 6years old, just run:  system("/usr/sbin/userdel -r <username>");

_________________________________
daniel a. g. quinn
starving programmer

the people who say you are not facing reality actually mean that you are not
facing their idea of reality.  reality is above all else a variable. with a
firm enough commitment, you can sometimes create a reality which did not
exist before.
 - margaret halsey




----- Original Message -----
Sent: Monday, June 10, 2002 8:20 AM
Subject: Re: Delete old unused accounts


> On Fri, May 31, 2002 at 10:21:25AM -0400, Edward Marczak wrote:
>
>
> > > I have been running a small server for about a year,
> > > New account are growing fairly well.
> > >
> > > Anyone who has a script to set cron to delete old unused accounts ?
> > What's the criteria to determine an "old unused account"?
>
> I would say no pop access for 6 month,
> but on another server using vpopmail/sqwebmail I would give them 12 month
>
> If anyone has a script for this then I could possibly change the time and
> ajust it to the propper use.
>
> Thank you in advance
> Mettavihari
>
> --------------------------------------------
> A saying of the Buddha from http://metta.lk/
> --------------------------------------------
> One who has conquered all defilements, cannot be defeated. Such a one is
The Buddha, who has attained unlimited power.
> Random Dhammapada Verse 179




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to