Login using "su - username" or ssh username@hostname gives an error "-bash: /home/username: is a directory".

Solution Verified - Updated -

Issue

  • Login using "su - username" or ssh username@hostname gives an error "-bash: /home/username: is a directory".
Eg:

[root@example ~]# su - username
-bash: /home/username: is a directory
Eg:

[root@client ~]# ssh user@server.example.com
username@server.example.com's password:
Last login: Mon Apr  9 09:52:21 2012 from server@example.com
-bash: /home/username: is a directory

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

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.