a small (low priority) doubt about /home and /export/home
Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
a small (low priority) doubt about /home and /export/home
Hi. I was reading documentation and looking to /home and /export/home and I got this doubt. Some (if not all) home directory may be on an NFS directory, but the administrator could like leaving some user home on the local machine. /home is under the control of the automounter in the default solaris configuration and it's not writable, why then is it considered as the default base dir by, for example, adduser command? I understand how it works but I don't know if I'm missing some point. Why creating directories on /export/home and then mount this on /home? In the case of a workstation whose users' home dirs were in an NFS, where should I create a local user? In this case I would mount the NFS dir on /home, and what about /export/home then? Should I create there the local accounts?
There's no absolute requirement to have either /home or /export/home. These are "standards" rather than "requirements". It is only in Solaris that I see "/export/home". Most other UNIX variants simply call it /home. Home directories could be in /var if you wanted (though I wouldn't recommend it!).
The /export/home designation comes from the probability that you want to have users using the same home directory on multiple servers rather than giving them each their own space on each of these servers. This saves on disk space and also is convenient for the users because they don't have to copy files from their home on one server to their home on another.
Home directories have no direct relationship with commands like adduser. The reason you see a local home when you want to use that command is because you're the root user. You would not want to have your root user unusable on a given server because it's home directory was on the NFS exported home of a different server. On most systems I put the root user's home in /root (not /) rather than any /home or /export/home.
There is not requirement that you actually export home directories even for non-root users to other servers - as noted above it is just a convenience. If /export/home can be a local mount and hurts nothing. The only thing truly important in home designation is that it be correct in the passwd file. Home directory doesn't even have to be a separate mount - you could put all the user's homes in / if you wanted but again I would strongly advise against it. The reason for having a separate mount is for efficiency and for insuring user's don't fill up your root filesystem when they all decide to download the latest song by Britney Spears on the same day.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
On every Unix and Unix-like O/S, it is an old and still recommended convention to have every home directory accessed with the /home/<username> path (root account is an exception).
Solaris is following this convention too. /export/home is commonly used with it to store the physical data, but /export/home shouldn't be used as is. This is just internal stuff.
You can still maintain this rule with you mixed remote and local users setting by allowing the local users home directories to be mounted locally.
This can easily be done by specifying these user's rules in the /etc/auto_home file before the generic NFS one, eg:
Distribution: slackware 12.0, Vector Linux STD 6.0 and 5.8, ZenWalk 4.6.1, OpenBSD 3.9
Posts: 389
Rep:
hi experts, upon reading the posts above, i still can't get the difference of the /export/home and /home in solaris. i mean why use the /export/home instead of the /home
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
By default, /home is an automount point so you cannot directly create directories there by design. That's the reason why you need to use another one, either locally (/export/home) or remotely (nfs_home_server:/export/home) to locate the actual user home directories. As already stated by jlightner, this allows to share the same home directory in a distributed environment.
If you do not plan to use that feature, just disable the automount stuff and simply use /home like the remaining Unix and Gnu/Linux.
In both cases, /home/<username> should be the home directory set in the passwd table.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.