5.5 Ensure access to the su command is restricted - wheel group contains root

Warning! Audit Deprecated

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

View Next Audit Version

Information

Restricting the use of su, and using sudo in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via sudo, whereas su can only record that a user executed the su program.

Solution

Add the following line to the /etc/pam.d/su file - auth required pam_wheel.so use_uid Create a comma separated list of users in the wheel statement in the /etc/group file - wheel-x-10-root,<user list>

See Also

https://benchmarks.cisecurity.org/tools2/linux/CIS_Amazon_Linux_Benchmark_v2.0.0.pdf

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-2

Plugin: Unix

Control ID: 60cb8c1cfa9685202bd5fd7c0d749227d14b000613d0f2f52e3b924d2bb42908