Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a fileserver running Ubuntu 10.04 I'd like to access via NFS from my Mac running 10.6.8. Problem is, while the usernames are the same, the uids are different.

Googling suggests that the past method of dealing with this was static uid mapping on the server end, but that seems to have been eliminated in NFSv4, which is the only version on 10.04 that I can find.

Is there any way to map the uids so I can get proper NFS read/write access? Or do I have to change the uid on one of the machines? If so, what's the best and most fool-proof way to go about it. I'm concerned about borking permissions all over the place.

share|improve this question
1  
Since this is the mac centric forum, can we narrow the scope to be changing uid on the mac (client end)? Macs generally start allocating uid at 501 for users that log in graphically - is this workable on the ubuntu server end? –  bmike Aug 22 '11 at 14:09

2 Answers 2

up vote 2 down vote accepted

Ultimately, the proper solution is to use a directory service (like NIS or LDAP) to provide consistent UID/GID mapping for all users. Of course, this is a very heavy solution for a smaller and/or home network.

The easiest thing to do is to simply make the UIDs/GIDs consistent on all the hosts involved.

share|improve this answer
2  
"The easiest thing to do is to simply make the UIDs/GIDs consistent on all the hosts involved." Not so easy after the fact ... –  Thilo Aug 22 '11 at 2:50
    
Renumbering UIDs/GIDs is trivial... recursive chown as root is dead simple. –  EmmEff Aug 22 '11 at 2:54
1  
Thanks. Ended up changing UID/GID on the server end (since I'm less worried about borking my home server than my Mac) using instructions here: askubuntu.com/questions/16700/how-can-i-change-my-own-user-id –  robmathers Aug 23 '11 at 21:23

You should look into using map_static on the server, as per: http://www.kernelcrash.com/blog/nfs-uidgid-mapping/2007/09/10/

Update It appears that map_static isn't supported in Ubuntu any more. Not sure what to replace it with - possibly NFSv4 exports with idmapd.conf?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.