MacNFSSetup: Difference between revisions
No edit summary |
m (Reverted edits by Yxawyjo (Talk) to last version by AlainKnaff) |
||
Line 1: | Line 1: | ||
This howto is based on info gathered from | This howto is based on info gathered from | ||
http://sial.org/howto/osx/automount/ and http://i1.dk/misc/automount_nfs_volumes_on_mac_osx/ , | http://sial.org/howto/osx/automount/ and http://i1.dk/misc/automount_nfs_volumes_on_mac_osx/ , | ||
Line 12: | Line 4: | ||
== Setting up OSX4 Macintosh as an NFS client == | == Setting up OSX4 Macintosh as an NFS client == | ||
This howto describes how to set up a mac as an (automount) NFS client mounting its homedirectories from remote directory | This howto describes how to set up a mac as an (automount) NFS client mounting its homedirectories from remote directory <code>10.0.0.1:/home</code> to local location <code>/home</code> | ||
== Preparation == | == Preparation == | ||
Before starting, make sure that currently | Before starting, make sure that currently <code>/home</code> is empty. If not, move its contents to another place. | ||
== Setting up automount == | == Setting up automount == | ||
[[Image:MacNFS.png|Setting up NFS using the Netinfo Manager]] | [[Image:MacNFS.png|Setting up NFS using the Netinfo Manager]] | ||
# Using the file manager (for filemanager usage see first point of [MacLdapAuth]), open | # Using the file manager (for filemanager usage see first point of [MacLdapAuth]), open <code>Applications/Utilities/NetinfoManager</code> | ||
# Under mounts, create a new directory named after the remote location: | # Under mounts, create a new directory named after the remote location: <code>10.0.0.1:/home</code> . To create a new directory, click on its parent (mounts), and then either click on the new item or the <code>Directory->New Subdirectory</code> menu item. Chose the name <code>10.0.0.1:/home</code> by editing the name propertie's value. | ||
# Set up the following properties (Using | # Set up the following properties (Using <code>Directory->New Property</code>): | ||
## | ## <code>name=10.0.0.1:/home</code> | ||
## | ## <code>dir=/home</code> | ||
## | ## <code>type=nfs</code> (or is that <code>vfstype=nfs</code> ?) | ||
# Set up the opts property to contain the following item. This is done by adding the first item using the | # Set up the opts property to contain the following item. This is done by adding the first item using the <code>Directory->New Property</code> menu item, and additional items using <code>Directory->New Entry</code>. | ||
## | ## <code>net</code> | ||
## | ## <code>-P</code> | ||
## | ## <code>-i</code> | ||
<code>-P</code> is used to tell the Macintosh to use a privileged client port to access the server (or else the server would refuse access), <code>-i</code> is used | |||
Save everything by clicking on another directory within the Netinfo manager (for instance, users). You are then prompted with a dialog asking you whether you want to save (yes), and update the current view (yes) | Save everything by clicking on another directory within the Netinfo manager (for instance, users). You are then prompted with a dialog asking you whether you want to save (yes), and update the current view (yes) | ||
Line 38: | Line 30: | ||
On some newer version of Leopard, you can edit /etc/fstab directly: | On some newer version of Leopard, you can edit /etc/fstab directly: | ||
<code>10.0.0.1:/home /home nfs async,intr,soft,-P</code> | |||
And comment out the /home line from /etc/automaster | And comment out the /home line from /etc/automaster | ||
Line 44: | Line 36: | ||
== Testing == | == Testing == | ||
# Before having added | # Before having added <code>net</code>, type <code>sudo mount /home</code> in a terminal. If it succeeds, that we are allowed access to the server. Unmount /home again (<code>sudo umount /home</code>), and proceed to next step. If error, try checking the server's logs to see what is going on (<code>/var/log/message</code>, <code>/var/log/syslog</code>) | ||
# After having added | # After having added <code>net</code>, type <code>sudo mount /home</code> again. This time, it should fail with a message saying that <code>/home</code> is owned by automounter. If any other error occurs (such as <code>mount: exec /usr/sbin/mount_ for /home: No such file or directory</code>), make sure <code>/home</code> is empty. A reboot might be needed to after emptying it. If that doesn't help, try removing the <code>/home</code> altogether (automount should be able to re-create it when needed). | ||
# Reboot you Mac, and try to log in using a server user. Log in should proceed quickly now, and the user should have a view on his homedirectory on the server. | # Reboot you Mac, and try to log in using a server user. Log in should proceed quickly now, and the user should have a view on his homedirectory on the server. |
Latest revision as of 19:47, 26 November 2010
This howto is based on info gathered from http://sial.org/howto/osx/automount/ and http://i1.dk/misc/automount_nfs_volumes_on_mac_osx/ ,
Setting up OSX4 Macintosh as an NFS client[edit]
This howto describes how to set up a mac as an (automount) NFS client mounting its homedirectories from remote directory 10.0.0.1:/home
to local location /home
Preparation[edit]
Before starting, make sure that currently /home
is empty. If not, move its contents to another place.
Setting up automount[edit]
- Using the file manager (for filemanager usage see first point of [MacLdapAuth]), open
Applications/Utilities/NetinfoManager
- Under mounts, create a new directory named after the remote location:
10.0.0.1:/home
. To create a new directory, click on its parent (mounts), and then either click on the new item or theDirectory->New Subdirectory
menu item. Chose the name10.0.0.1:/home
by editing the name propertie's value. - Set up the following properties (Using
Directory->New Property
):name=10.0.0.1:/home
dir=/home
type=nfs
(or is thatvfstype=nfs
?)
- Set up the opts property to contain the following item. This is done by adding the first item using the
Directory->New Property
menu item, and additional items usingDirectory->New Entry
.net
-P
-i
-P
is used to tell the Macintosh to use a privileged client port to access the server (or else the server would refuse access), -i
is used
Save everything by clicking on another directory within the Netinfo manager (for instance, users). You are then prompted with a dialog asking you whether you want to save (yes), and update the current view (yes)
On some newer version of Leopard, you can edit /etc/fstab directly:
10.0.0.1:/home /home nfs async,intr,soft,-P
And comment out the /home line from /etc/automaster
Testing[edit]
- Before having added
net
, typesudo mount /home
in a terminal. If it succeeds, that we are allowed access to the server. Unmount /home again (sudo umount /home
), and proceed to next step. If error, try checking the server's logs to see what is going on (/var/log/message
,/var/log/syslog
) - After having added
net
, typesudo mount /home
again. This time, it should fail with a message saying that/home
is owned by automounter. If any other error occurs (such asmount: exec /usr/sbin/mount_ for /home: No such file or directory
), make sure/home
is empty. A reboot might be needed to after emptying it. If that doesn't help, try removing the/home
altogether (automount should be able to re-create it when needed). - Reboot you Mac, and try to log in using a server user. Log in should proceed quickly now, and the user should have a view on his homedirectory on the server.