How do I restrict "su - root" access to a set of users but allow all users to su to each other?
Issue
-
Only certain team members should be able to "su" to root. All other users should be able to su to any other account apart from root.
-
Eg :-
- user1 & user2 must be able to su to root.
- All other users should not able to switch user to root but can
su
to each other (with passwords).
Environment
- Red Hat Enterprise Linux 5, 6, 7 and 8
- PAM (Pluggable authentication modules)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.