I spent a few days trying to figure out how to setup automount on Solaris.
Although its very well documented on the Solaris website, its doe not have and end to end document howto. Here it is.
This will not include the NFS server details, I already have a howto for that here.
Lets get started
Create a directory where our new network mountable home area will be located.
1 |
mkdir /homez |
Edit the auto_master file
1 |
vi /etc/auto_master |
Ensure this line exists.
1 |
/homez auto_home -nobrowse |
Edit the auto_home file
1 |
vi /etc/auto_home |
ensure the following exists, these are the two users we’ll be testing with.
1 2 |
user01 10.1.1.12:/homez/user01 user02 10.1.1.12:/homez/user02 |
Create the users on the local system, you can avoid having to do this if you setup LDAP/NIS. For this howto i want to keep it simple, please ensure the users are setup with the same UID as the NFS server, otherwise you will face permission problems.
1 2 3 4 |
useradd -u 25555 -d /homez/user01 -s /bin/bash user01 useradd -u 25556 -d /homez/user02 -s /bin/bash user02 passwd user01 passwd user02 |
Lets see if automount is working, if it is you will see the following. If nothing appears, you need to start automount (next step)
1 2 3 4 5 6 |
ps -ef | grep automount bash-3.00# ps -ef | grep auto root 8530 8528 0 11:41:04 ? 0:00 /usr/lib/autofs/automountd root 8528 7795 0 11:41:04 ? 0:00 /usr/lib/autofs/automountd root 8545 7894 0 11:41:41 pts/3 0:00 grep auto |
Lets start automount with verbose logging for faultfinding.
1 |
automount -v |
Your done, enjoy.