Wednesday, September 05, 2007

L2S: /home vs /export/home

One of my big annoyances with this Linux to Solaris transition has been the difference between the Linux /home directory and the Solaris /export/home directory. From the Solaris point of view, no one should ever have a local account. Since all accounts will be exported, they all go under /export/home. When a network user log's in, the automounter mounts their account to /home.

Turns out, we can trick the automounter to clean up this mess by commenting out the last line of /etc/auto_home, and adding the user name and exported directory:
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)auto_home 1.6 03/04/28 SMI"
#
# Home directory map for automounter
#
#+auto_home
doug localhost:/export/home/doug

Now we steal a trick the Linux automounter man page. Replace the last line with the following:
* localhost:/export/home/&

The asterick and ampersand allow wild carding. Next time users login, they find them selves in /home/$USER.

No comments:

Post a Comment