« Laws | Main | Where there's a will... »

November 02, 2005

Automount /home (Solaris 10)

In Solaris prior to 10, you got the automount working by changing the /etc/auto.home file and restarting autofs. The file needs to have an extra line in it:

* hostname:/export/home/&

Where hostname is the server that holds the home directories (it should be in the /etc/dfs/dfstab file on that server so that it is available to the machine you are currently working on).

Next, you need to restart the autofs daemon:

cd /etc/init.d
./autofs stop; ./autofs start

On Solaris 10, you get an error message about "no such file" because the autofs startup is no longer a simple script in the init sequence. Instead it is now a fully fledged "service" that runs under svcs. So, instead you need to run:

# svcs | grep auto
legacy_run Oct_24 lrc:/etc/rc2_d/S72autoinstall
online 17:31:10 svc:/system/filesystem/autofs:default
# svcadm -v restart svc:/system/filesystem/autofs:default
Action restart set for svc:/system/filesystem/autofs:default.

Now you should be able to change to the directory /home/username and magically, the directory will come into existence, mounted from the specified host.

Posted by Ozguru at November 2, 2005 06:00 AM