How do I restrict root user to use password authentication while switching to normal user?

Solution Verified - Updated -

Issue

  • root user should not be able switch to users using su - <username> without authentication.

  • root user should be authenticated while switching to user using su - <username> for specific users, while allowing password less authentication for specific users.

  • How do I restrict root user to use password authentication while switching to normal user and allow root user to use passworless authentication while switching between users for certain users only ?

Environment

  • Red Hat Enterprise Linux 6 and 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content