Re: users sorted by login date

From: Andreas Schulze (b79xan_at_gmx.de)
Date: 03/16/04


Date: Tue, 16 Mar 2004 18:13:20 +0100


"Frédéric Normand" <fr.normand@laposte.net> schrieb im Newsbeitrag
news:2bjd505tiobv95l11r9dfggl4firbjo01k@4ax.com...
>
> In order to check security on my machines, I want to identify unused
> accounts.
>
> Does anybody knows a tool which could give me the list of the accounts
> sorted by logindate ?
>
> I know these informations are obtainable by a lsuser ALL command but
> the lastlogindate is so odd in that format, and the result of the
> lsuser ALL command seems cumbersome to exploit while gecos field may
> contain blanks characters so that the splitting of the line is
> unpredictable.

Tool? What tool? You might simply use what you have got on your server
already. And the lsuser -a option spares you from fiddleing around with
blank characters ;-) Frederic, reading at least the manpage for lsuser might
be a good idea too because when you struggle in vain with commands like
lsuser you will hardly tackle security problems on your machines :-( Try the
following line for a start:
# lsuser -a time_last_login ALL |grep last |sed 's/[ ].*=/ /g' |while read
user date; do print -n $user ; perl -le "print scalar localtime $date" ;
done

HTH,
andreas



Relevant Pages

  • Re: Basic Sec Template Design
    ... defined in a GPO linked to the domain object to impact domain accounts ... allowed to impact machines then these impact the machine local ... Have you also reviewed the security guides? ...
    (microsoft.public.windows.server.security)
  • Re: users sorted by login date
    ... > In order to check security on my machines, ... > Does anybody knows a tool which could give me the list of the accounts ... > lsuser ALL command seems cumbersome to exploit while gecos field may ...
    (comp.unix.aix)
  • users sorted by login date
    ... In order to check security on my machines, ... Does anybody knows a tool which could give me the list of the accounts ... lsuser ALL command seems cumbersome to exploit while gecos field may ...
    (comp.unix.aix)
  • Discover ldap accounts on AIX
    ... Is there a way to discover all of the ldap accounts bound to an AIX ... If I know an account is an ldpap account, ... However 'lsuser ALL' only shows local ...
    (comp.unix.aix)