While running `su - <username>` with root credentials, getting the error `su: /bin/bash: Permission denied`

Solution Verified - Updated -

Issue

  • The superuser root is not able to switch to the newly added users.
  • Only the users which are part of root as their secondary group can get the shell.
  • There is no changes in pam done.
  • The shell available for the newly added users is /bin/bash
  • Following is the example of the issue.
# useradd -u 1000 test
# passwd test
Changing password for user test.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
# su - test
su: /bin/bash: Permission denied

Environment

  • Red Hat Enterprise Linux (all)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.