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, 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