Re: users sorted by login date
From: Andreas Schulze (b79xan_at_gmx.de)
Date: 03/16/04
- Next message: Bill: "Re: how many disks to one vpath"
- Previous message: Bill: "Re: users sorted by login date"
- In reply to: Frédéric Normand: "users sorted by login date"
- Next in thread: Bill: "Re: users sorted by login date"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Bill: "Re: how many disks to one vpath"
- Previous message: Bill: "Re: users sorted by login date"
- In reply to: Frédéric Normand: "users sorted by login date"
- Next in thread: Bill: "Re: users sorted by login date"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|