oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Discover the Power of Open Directory (Part 2)
Pages: 1, 2, 3, 4

Now we can modify Open Directory to add NFS Mount records so that all Open Directory clients will mount the file servers we define. To do this we first need to go into export mode and Show "All Records." Go to the Workgroup Manager Preferences and enable Show "All Records" tab and inspector. Refer to Figure 9 for an example.

Show All Records tab
Figure 9. Check the Show "All Records"... preference

This enables us to actually edit the LDAP database by hand. Next we need to add a mount record. You will need to select the Mount container by navigating to the bullseye type button. From there you will see a drop-down list right under the search field. Select Mounts from this big list of LDAP containers. See Figure 10 for an example of this.

Selecting Mounts
Figure 10. selecting mounts

Since a picture is worth a thousand words, I am including an image of the proper attributes that are necessary to enable an NFS file server Mount record. I created a new Mount record by selecting New Record. I then created new Attributes for this Mount record by selecting New Attribute. If you look at the Open Directory documentation, it refers to the proper attribute values that I am using on pages 224 and 225. To my knowledge, this is the only documentation ever published on how to get NFS home directories and Mount records to work (other than this article). Refer to Figure 11 for the exact values.

Example Complete NFS Mount Record
Figure 11. Example complete NFS Mount record

Now that we have set up a Mount record, all Open Directory clients will automatically mount cent:/mnt/raid. In order to test this, you will need to reboot your machine. Usually, just a logout will be enough to tell the automount daemon to reload, but the first time a Mount record is added to Open Directory you will need to reboot your machine for the setting to take effect. See Figure 12 for an example of the automounted volume.

Automounted NFS Volume
Figure 12. Automounted NFS volume

Configuring a Common NFS Home Directory

Now that we have verified that we have an automounted NFS volume, you might be wondering, "how are a Linux machine and a Mac going to get the same home directory, because the way they mount things is so different?" All we need to do is create a symbolic link on both the Linux client and Mac client so that we can add one NFS Home Directory value to Open Directory. Remember, we have a local home directory for our oduser now. On the Mac we'll do this by:

sudo ln -s /Network/Servers/cent/mnt/raid/home /odhome

This will allow the home directory to appear to be: /odhome/oduser on a Mac. Now, on our Linux client we'll create a symbolic link that will create the same uniform path by:

sudo ln -s /mnt/raid/home/ /odhome

On Linux we have a network home directory path of /odhome/oduser. If you haven't already created a placeholder directory for oduser go ahead and do so now by using the following commands on the Linux file server:

mkdir /odhome/oduser

chown -R oduser:staff /odhome/oduser/

This will ensure that the oduser account will have the proper permissions when OS X creates the account for the first time. If you ever experience problems with common NFS home directories, make sure that you check your permissions for the user using the preceding example.

Pages: 1, 2, 3, 4

Next Pagearrow