MacNFSSetup: Difference between revisions

From LLL
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://yxiwisewava.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
----
=[http://yxiwisewava.co.cc CLICK HERE]=
----
</div>
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 4: Line 12:
== 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 <code>10.0.0.1:/home</code> to local location <code>/home</code>
This howto describes how to set up a mac as an (automount) NFS client mounting its homedirectories from remote directory &lt;code&gt;10.0.0.1:/home&lt;/code&gt; to local location &lt;code&gt;/home&lt;/code&gt;


== Preparation ==
== Preparation ==


Before starting, make sure that currently <code>/home</code> is empty. If not, move its contents to another place.
Before starting, make sure that currently &lt;code&gt;/home&lt;/code&gt; 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 <code>Applications/Utilities/NetinfoManager</code>
# Using the file manager (for filemanager usage see first point of [MacLdapAuth]), open &lt;code&gt;Applications/Utilities/NetinfoManager&lt;/code&gt;
# 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.
# Under mounts, create a new directory named after the remote location: &lt;code&gt;10.0.0.1:/home&lt;/code&gt; . To create a new directory, click on its parent (mounts), and then either click on the new item or the &lt;code&gt;Directory-&gt;New Subdirectory&lt;/code&gt; menu item. Chose the name &lt;code&gt;10.0.0.1:/home&lt;/code&gt; by editing the name propertie's value.
# Set up the following properties (Using <code>Directory->New Property</code>):
# Set up the following properties (Using &lt;code&gt;Directory-&gt;New Property&lt;/code&gt;):
## <code>name=10.0.0.1:/home</code>
## &lt;code&gt;name=10.0.0.1:/home&lt;/code&gt;
## <code>dir=/home</code>
## &lt;code&gt;dir=/home&lt;/code&gt;
## <code>type=nfs</code> (or is that <code>vfstype=nfs</code> ?)
## &lt;code&gt;type=nfs&lt;/code&gt; (or is that &lt;code&gt;vfstype=nfs&lt;/code&gt; ?)
# 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>.
# Set up the opts property to contain the following item. This is done by adding the first item using the &lt;code&gt;Directory-&gt;New Property&lt;/code&gt; menu item, and additional items using &lt;code&gt;Directory-&gt;New Entry&lt;/code&gt;.
## <code>net</code>
## &lt;code&gt;net&lt;/code&gt;
## <code>-P</code>
## &lt;code&gt;-P&lt;/code&gt;
## <code>-i</code>
## &lt;code&gt;-i&lt;/code&gt;


<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  
&lt;code&gt;-P&lt;/code&gt; is used to tell the Macintosh to use a privileged client port to access the server (or else the server would refuse access), &lt;code&gt;-i&lt;/code&gt; 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 30: Line 38:
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>
&lt;code&gt;10.0.0.1:/home /home nfs async,intr,soft,-P&lt;/code&gt;


And comment out the /home line from /etc/automaster
And comment out the /home line from /etc/automaster
Line 36: Line 44:
== Testing ==
== Testing ==


# 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>)
# Before having added &lt;code&gt;net&lt;/code&gt;, type &lt;code&gt;sudo mount /home&lt;/code&gt; in a terminal. If it succeeds, that we are allowed access to the server. Unmount /home again (&lt;code&gt;sudo umount /home&lt;/code&gt;), and proceed to next step. If error, try checking the server's logs to see what is going on (&lt;code&gt;/var/log/message&lt;/code&gt;, &lt;code&gt;/var/log/syslog&lt;/code&gt;)
# 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).
# After having added &lt;code&gt;net&lt;/code&gt;, type &lt;code&gt;sudo mount /home&lt;/code&gt; again. This time, it should fail with a message saying that &lt;code&gt;/home&lt;/code&gt; is owned by automounter. If any other error occurs (such as &lt;code&gt;mount: exec /usr/sbin/mount_ for /home: No such file or directory&lt;/code&gt;), make sure &lt;code&gt;/home&lt;/code&gt; is empty. A reboot might be needed to after emptying it. If that doesn't help, try removing the &lt;code&gt;/home&lt;/code&gt; 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.

Revision as of 04:55, 24 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

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

Before starting, make sure that currently <code>/home</code> is empty. If not, move its contents to another place.

Setting up automount

Error creating thumbnail: Unable to save thumbnail to destination
  1. Using the file manager (for filemanager usage see first point of [MacLdapAuth]), open <code>Applications/Utilities/NetinfoManager</code>
  2. 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.
  3. Set up the following properties (Using <code>Directory->New Property</code>):
    1. <code>name=10.0.0.1:/home</code>
    2. <code>dir=/home</code>
    3. <code>type=nfs</code> (or is that <code>vfstype=nfs</code> ?)
  4. 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>.
    1. <code>net</code>
    2. <code>-P</code>
    3. <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)

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

Testing

  1. 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>)
  2. 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).
  3. 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.