Having a home directory being /export/home/username
is a configuration oddity. The actual directory is located by default here when the user account is created by the useradd
command but this directory should nevertheless be accessed through /home/username
.
The convention and best practice is then to have /home/username
being the home directory and configuring the automounter
to manage the mapping between both.
By default the automounter master configuration file /etc/auto_master
contains this line:
/home auto_home -nobrowse
That means /home
is handled by the automounter. As a consequence, no directory can be directly created there which is a common source of frustration for novice administrators on Solaris.
The /home
directory is configured in the /etc/auto_home
file. It tells the automounter
where to find the actual directory to mount under /home
.
For example:
vivek nfsserver:/export/home/&
tells that vivek's home directory is to be found on nfsserver
under the /export/home/vivek
share.
Locally mounted home directories can be configured that way:
username localhost:/export/home/&
When the automounter
detects the file server is local, it uses lofs
instead of nfs
for performance reasons. These kinds of home directory mounts can also be used with Solaris zones.
Reference: https://c0t0d0s0.org/solaris/english/2008/02/17/less-known-solaris-features-export-home-home-autofs.c0t0d0s0.html