Search code examples
unixmainframezos

How to display users in z/os Unix group?


I'd like to display the users assigned to a Unix group in z/OS. On other platforms one of these commands would work, but they aren't available in USS:

members
lid
getent

How can I do this from the z/OS Unix shell command line? Or what manual might describe it? Thanks.


Solution

  • This will depend on the security manager you have installed. Assuming RACF.

    Here is a link to an article explaining the process.

    You can list the RACF® users and groups associated with UIDs and GIDs using the following methods:
    
    1. ISPF shell. See z/OS UNIX System Services User's Guide for information about using the ISPF shell.
    
    2. RACF database unload utility (IRRDBU00). See Using the RACF database unload utility (IRRDBU00) for information.
    
    3. If you use UNIXMAP profiles to associate RACF users and groups with UIDs and GIDs, you can also use RLIST command. For example:
    
        To see the RACF groups that are associated with GID 237, enter:
        RLIST UNIXMAP G237 ALL
        To see the RACF user IDs that are associated with UID 0, enter:
        RLIST UNIXMAP U0 ALL
    
        To see all RACF groups and user IDs associated with GIDs and UIDs, enter:
        RLIST UNIXMAP * ALL
    
        For information about the UNIXMAP class, see Using the UNIXMAP class and Virtual Lookaside Facility (VLF).
    
    4. For installations at AIM stage 2 or higher, you can list a set of users or groups with a specific UID or GID, for example using '223' for the UID value and '55' for the GID value, enter:
       SEARCH CLASS(USER)UID(223)
       SEARCH CLASS(GROUP) GID(55)