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

    Join Date
    May 2011
    Posts
    108
    Rep Power
    4

    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. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,436
    Rep Power
    1688
    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 Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,837
    Rep Power
    480
    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