I have RHEL running on a system with my account having the root privilege. My home directory is in /lhome/myusername. If I try to add any user their home directory is created in /home/newuser.

What is the difference between lhome and home?

Also I was trying to setup a ssh connection using cygwin from my windows 7 PC. Even though I followed all the steps in this tutorial, ssh still asks for my password. Does this have anything to do with my home directory being in lhome?

  • 1
    Is your system configured to have /home mounted separately on a remote filesystem? (I could see how it's useful to have systems accounts not depend on a working network connection, but I've not come across /lhome yet.) Jan 1, 2014 at 11:45
  • @UlrichSchwarz No /home is not configured to be mounted to/from anywhere else.
    – Manoj
    Jan 1, 2014 at 12:05

3 Answers 3


/lhome is not a standard directory. This is a local setup. Ask your system administrator.

RHEL uses SELinux. It's possible that the non-default location of /lhome has somehow caused an incorrect setup of the SELinux security contexts which is causing the SSH server not to be able to read the keys in ~/.ssh/authorized_keys. There will be entries in the system logs (/var/log/messages) if this happens. See Red Hat Bug 499343.

To allow the SSH keys to be read, run the following command:

restorecon -R -v ~/.ssh

Although I +1'd Gilles's answer, there is a bit more to add to his answer to make it complete.

First, make sure the ownership and permissions on .ssh and authorized_keys is your user and only accessible by your user.

SELinux has been told by RedHat that /home/ is used for user's home directories. If you want to change / add to that (as I often do), there's a change you can make to allow SELinux to recognize your alternate directory as a home directory.

From /etc/selinux/semanage.conf:

# usepasswd check tells semanage to scan all pass word records for home directories
# and setup the labeling correctly.  If this is turned off, SELinux will label /home 
# correctly only.  You will need to use semanage fcontext command.  
# For example, if you had home dirs in /althome directory you would have to execute
# semanage fcontext -a -e /home /althome

So you could run semanage fcontext -a -e /home /lhome then re-run restorecon -RFv /lhome This should fix the problem.


Ask your System Administrator.

At some companies and universities /home is a network user profile, so you can log into any Linux computer on the network and you will have access to the same set of files, without needing to worry about running scripts to sync your files to the central file server.

Working out of a networked directory comes at a cost though. Disk I/O becomes network I/O, with lower throughput and higher latency. For this reason, we also have /lhome, which by convention is a place to store user files that would normally be saved in /home but would incur an unacceptable network cost. I use my /lhome directory for svn checkouts and building directories.

Quick example:

SVN checkout to /home
real    7m11.669s
user    0m16.634s
sys     0m22.194s

SVN checkout to /lhome
real    0m23.729s
user    0m6.730s
sys     0m1.814s

This could hint at some problems with the configuration of the network file share or the LAN architecture, but unless the network file share behaves as a proxy and caches common files that other users request, the performance of saving to local disk probably won't exceed the network file share.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .