RESTRICT SPECIFIC USER TO SU THE ROOT USER [RHEL7]

Posted on March 13, 2019

0


ENVIRONMENT

OS = 7.3 redhat

STEP-1

Open the file /etc/pam.d/su in vi or ay file editor and add the below line.

vi /etc/pam.d/su

auth      required      pam_wheel.so use_uid root_only use_uid group=groupa

STEP-2

Ensure that the user who you want to su to the root user is the member of groupa.

Posted in: Tech News