su: /bin/bash: Permission denied

This is a weird problem. It occurred for me when I was trying to login as another user from root. For example,

[root]# su user77

It generated the below error.

su: /bin/bash: Permission denied

I have seen many geeks from forums suggested several methods to resolve this issue. I have tried most of those. So not sure which one worked for me. But I think this one worked for me, so it can work for you too.

  • I have changed the directory mode into 755 for the directory / and directory /bin


  • This error can happen if somehow your user is removed from the wheel group accidentally. To add an user to wheel, you can type below command

  • gpasswd -a username wheel

    If you are still having this problem, then dig more at google.

    Comments

    Cal39Sailor said…
    I had this problem trying to start jboss, when the user 'jboss' had been defined already by someone else. Problem was that the jboss user was a "service" user, with a shell of "/bin" instead of "/bin/bash". Quick-and-dirty fix was to edit /etc/passwd as root, to change the shell to "/bin/bash". After that, I could su - jboss, and the startup script worked correctly.