New To UNIX - Need Script to create report of user & group accounts

Hi, I'm new to the world of UNIX and have been asked to create a complex script (at least complex to me:confused:) for AIX UNIX to create a report of all the users on the server including server, user, UID, groups, GID, etc.
Found a script using lsuser, but the output is still lacking. 2 things I can't figure out

  • I would like the groups and GID to display like when using id GID#(group)
  • But need to replace the "," with a blank space for the list of groups
    The output file while be input into an Excel spreadsheet so comma's would be required between the fields (just not separating the list of groups).

I've attached a copy of the script I found, hopefully someone will be able to help! Thanks in advance for any assistance!! :slight_smile:

Could you please post the output of :

lsuser -a ALL

/home/root:0>

lsuser -a ALL

root
daemon
bin
sys
adm
uucp
guest
nobody
lpd
lp
oracle
galaxy
ftptest
tstapp
vot
sshd