2.2 Ensure the PostgreSQL pg_wheel group membership is correct- /etc/groups

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The group pg_wheel is explicitly created on a host where the Postgres server is installed. Membership in this group enables an ordinary user account to gain superuser access to a machine by using the su command. Only user accounts authorized to have superuser access should be members of the pg_wheel group.
Rationale:
Users with unauthorized membership in the pg_wheel group can assume the privileges of the owner of the Postgres RDBMS and administer the database, as well as accessing scripts, files, and other executables they should not be able to access.
NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

If the pg_wheel group does not exist, use the following command to create it:
$ getent group pg_wheel || groupadd pg_wheel && getent group pg_wheel
pg_wheel:x:502:
Note: that your system's group number may not be 502. That's OK.
Adding the postgres user to the newly created group is done by issuing:
$ gpasswd -a postgres pg_wheel
Adding user postgres to group pg_wheel

Removing a user account from the pg_wheel group is achieved by executing the following command:
$ gpasswd -d pg_wheel user1
Removing user user1 from group pg_wheel
$ groups user1
user1 : user1

See Also

https://workbench.cisecurity.org/files/2063

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-2, CSCv6|14.4

Plugin: Unix

Control ID: 0c40c14512f8d90fbab10f0661930f58f88ef5913b9faaac4264b6d2019818ec