Macs at home; Part 6: NFS server

Filed under: Geekiness — iain @ 21:33:10

See the introduction to this post.

Macs can be NFS servers with a little poking. Here’s how to export /Applications to without root squashing.

    # nicl . -create /exports/\\/
    # nicl . -append /exports/\\/ opts maproot=root
    # nicl . -append /exports/\\/ opts alldirs"
    # nicl . -append /exports/\\/ opts network=
    # nicl . -append /exports/\\/ opts mask=

Then you need to start up mountd and nfsd.

    # /usr/sbin/mountd
    # /usr/sbin/nfsd -u -t -n 6

Read the fine manual.


Now that’s all tremendously exciting but how do you re-export the same filesystem to another subnet? Hmmm. Dunno…

If you change the settings you can HUP mountd. nfsd actually execs a bunch of nfsd-server processes but you don’t need to HUP them.

On reboot things will Just Work because the system will see the exports in NetInfo and start the daemons automatically.

Apparently you can use Kerberos. I’ll have to try that. It does mean compiling NFSv4 on my Slackware machine which I’ve been putting off for about a year now…

Anyway, next time I’m fairly confident I’ll be telling you about apple-mcxflags and apple-mcxsettings.

Update 2007-10-31: On Leopard Apple have obsoleted NetInfo so the above won’t work.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress