User/group reporting tool?

My users and groups have gotten out of control on a lot of my servers. Is their some tool out there that can give me a report on;

  1. users
  2. what groups they are assigned to
  3. comment field
  4. last login

Something that can pull all this into a nice graphical page for the bosses to look at.

Soalris 8 and 9 boxes.

maybe the smc (solaris management console) can give you the information you are looking for. if not you maybe need to write a small script to collect the needed data for you.

for i in $(logins -u| nawk '{print $1}')
do
  logins -mx -l $i
  last $i | head -1
  echo
done

Nice graphical page left as an exercise for the reader :wink:

there was a problem with the first line...

for i in `logins -u | awk '{print $1}'`

the rest works fine for me....

and a "cut" is much faster then "awk" in this case....

for i in `logins -u | cut -d " " -f1`

Awesome !!!

Now exporting the output into a excel spreedsheet :slight_smile:

What is the Linux equivalent to the logins command?

Not really a problem unless you use an obsolete, non POSIX shell ...

Also, your substitute nawk by awk which makes that part roughly four times slower. I'm ruling out you have /usr/xpg4/bin first in your PATH otherwise you wouldn't have complained about the POSIX $(...) syntax.

You are correct here. Perhaps speed is no big deal in the OP case and I find the (n)awk syntax more readable.

As far as I know, there is none, although writing a script implementing a subset of what logins do should be relatively easy.