How to su to another user account without password

Solution Verified - Updated -

Issue

  • an user account called origin_user to su to another user account called target_user without the need to key in target_user's password.
  • all the accounts in a group called test_group to su to target_user without keying in target_user's password

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

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