To identify the group owner

If I have to identify the group owner of an AIX group, what is the command to be used. Example: there is an mqadm group, how do I find the owner of this group?
Please help.

Hello,

Please refer the following thread for same.

Also you can try to search your queries in the search utility of this forum too.

Thanks,
R. Singh

Groups do not have owners.

A group is created as a means of managing access rights for a "group" of users en masse.

A group can be created with any arbitrary name: mqadm in your case.

If you 'cat' the group file (usually located at /etc/group) it will show what groups exist.

# cat /etc/group

On one line you will see the mqadm group and, at the end of the line, the list of members (users) of that group. The list is usually shown as actually usernames, otherwise it is a list of UID's (user numbers). If it's UID's (for example a list like 24,34,41,67,104) then you will need to match these numbers by looking in /etc/passwd file to translate each UID to a username.

DO NOT edit or in any way try to change /etc/group or /etc/passwd.

I am not an AIX expert. You may yet get better answer(s).

Hi,

Easier than that in AIX, just run

lsgroup "groupname"

Regards

Dave

2 Likes

To list the members without tooling, you need to look in two places. In /etc/group file you will find the secondary group members and in /etc/passwd you will find the primary group members.

1 Like

Hi,

@Scrutinizer - don't you mean the primary group for each user?

Regards

Dave

I mean besides the secondary group members, you can find the gid (group id number) in /etc/group and use that to find all the users in /etc/passwd that are primary group members, i.e. have the gid in the primary group field..

1 Like