Prevent specific users from switching to root
If you only want certain users to be blocked from becoming root (using su), follow this.
➤ Step 1: Restrict su command to sudo group
Then add only trusted users to suusers:
If you don’t add someone (like zakir or mahafiz), they cannot use su to switch to root.
Test:
You’ll get:
0 Response to " "
Post a Comment