Enabling Os X Leopard to write to a nfs share by changing uid

Categories: Mac OS X, TechNotes
Tags: No Tags
Comments: No Comments
Published on: April 10, 2008

I’ve go an iMac with Fedora 8 setup as a nfs server. Usually I access this from my Macbook which currently also is running Fedora 8, but in a dual boot setup with Os X. When in Fedora the Macbook has read and write access and everything work flawlessly, but in Os X I have until now only had read access.

After testing out different settings on the server with no luck I suddenly realized what the problem was. The uid on my user in Os X was different from my uid in Fedora. Fedora uses uid 500 for the first user on the system (you can find your uid in the /etc/passwd file), but in Os X my uid was 501. To remedy this I changed the uid on my Os X user to match the uid on in Fedora with the following two steps. (Warning!!!This can probably mess up your system pretty bad!! I did it on a fresh install of Os X, and had no data to loose. You follow these instructions at your own risk. )

This is the uid change

# sudo dscl . -change /Users/morten UniqueID 501 500

This reclaims ownership of my users home directory

# sudo chown -Rh morten /Users/morten

After a reboot and some minor checks to see that everything was still ok with my Os X install, I started the “Directory Utility” and made a new map to my nfsserver. High presto.. write access!!

Os X also needs the setting “insecure” on the server to be able to connect. This setting give nfs permission to use ports above 1024.

  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • Google Bookmarks
  • StumbleUpon
  • FriendFeed

Leave a Reply

Your email address will not be published. Required fields are marked *

*


three × = 24

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Welcome , today is Sunday, February 5, 2012