Create NFS exports from the command line

Jul 31, '02 08:54:46AM

Contributed by: Anonymous

Exporting NFS shares under Mac OS X can be kind of a hassle even if you are used to a Unix environment: OS X requires painful fiddling with the Netinfo DB in order to create NFS exports.

In order to avoid that struggle, I've hacked together a shell script that will allow you to (amongst other things) automatically create NFS exports from a Unix-like /etc/exports file. The script allows you to add/remove export entries to/from the Netinfo database without ever directly having to fiddle with it - you can use export entries similar to what is being used on other UNIX platforms. Both the script and some documentation are available on my web site. The documentation should allow you to get going even with only a little Unix experience. I hope you'll find this script useful.

If you prefer a graphical utility to create NFS exports, iTools is a commercial package that can (amongst other things) do the trick. Please note that I am in no way affiliated with the company offering that product.

[Editor's note: I have not tested this script myself...]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020731085446676