I need to view the members of a group related to an oracle installation.
Asked
Active
Viewed 7.7k times
23
-
5What do you mean by "rights" in this context? – Stephen Harris Sep 20 '16 at 14:25
-
Duplicate of: https://stackoverflow.com/questions/2835368/how-to-list-all-users-in-a-linux-group – Ewa Nov 19 '18 at 14:45
-
1Can we re-open this question and set it as duplicate instead? There is a good answer and many votes. Maybe just need to edit the question for clarity – hanxue Sep 12 '19 at 04:15
-
@hanxue Dupes can not be created to the posts of other SE sites. It is because the sites are mostly independent installations of the SE software, using different databases. Possibly they are not very strong to understand why would it be useful. – peterh Jul 07 '20 at 09:38
2 Answers
38
You can use getent to display the group's information. getent uses library calls to fetch the group information, so it will honour settings in /etc/nsswitch.conf as to the sources of group data.
Example:
$ getent group simpsons
simpsons:x:742:homer,marge,bart,lisa,maggie
The fields, separated by :, are—
- Group name
- Encrypted password (not normally used)
- Numerical group ID
- Comma-separated list of members
-
6On Ubuntu at least, this won't include users whose initial login group is
simpsons. – jwodder Sep 20 '16 at 17:40 -
@jwodder A very good point, and true for all Unix-like systems. I'm ashamed not to have thought of that! – Flup Sep 20 '16 at 17:55
8
list members:
getent group <group>
And what rights? On filesystem, sudo, ssh? On filesystem:
find / -xdev -group <group>
Ipor Sircer
- 14,546
- 1
- 27
- 39
-
2On Ubuntu at least, this won't include users whose initial login group is
<group>. – jwodder Sep 20 '16 at 17:41