While running `su - <username>` with root credentials, getting the error `su: /bin/bash: Permission denied`
Issue
- The superuser root is not able to switch to the newly added users.
- Only the users which are part of
rootas their secondary group can get the shell. - There is no changes in
pamdone. - 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, tools, and much more.