1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Rep Power

    Command to list users and groups?

    Hi. I search the internet and it mentioned lsuser & lsgroup but command not found. What is the command to list users and groups?
  2. #2
  3. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2006
    Rep Power
    They are, I believe, AIX commands.
    I am not sure there is a command to 'nicely' list the users and groups, beyond using cat and/or some form of awk to prettify the output.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  4. #3
  5. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    I've got a
    groups [user]
    command. Looks like you need to read /etc/passwd for the users. Roughly:
    gawk -F: '/home/{print $1}' /etc/passwd

    gawk awk or nawk or some variant new to me.

IMN logo majestic logo threadwatch logo seochat tools logo