[clue] NFS uids? (FreeBSD/Gentoo)

Yaverot Yaverot at computermail.net
Tue Mar 15 01:57:39 MDT 2016


I'm finally making the transition away from my home OpenSolaris fileserver which I setup apparently in June 2009.  
The new system is FreeBSD 10.2
I've successfully done a zfs send of all the data from the old server.  Now I'm trying to set up sharing from it.
I'm also taking this opportunity to switch from  cifs/samba to NFS(4), since neither is the "just flip the magic switch" on any open source operating system, but NFS is supposedly easier "once you've done it right the first time".

So I believe I'm now getting a "successful" mount, but can't read anything due to uid/gid mismatch. It could still be something else, but the mount command is not coming back with failures anymore.
On the old fileserver, the shared data was all written yaverot:yaverot (501:501), so it was received as 501:501 on the new server.
On the new server I created default ids and everything in the home folder is yaverot:yaverot (1001:1001) - the only data of value attached to this user is its ~/.ssh/ and that it is part of wheel.  

for my clients (running Gentoo)
  yaverot:users (1000,100) 
luckily, it appears they're all the same

So I'm looking for the easiest/simplest solution that will work. I think it is changing my user on the new server to be 501:501 and then allow NFSv4 to do conversion like it supposedly does is easiest, which will work when the system knows the "correct" uid/gid for my user.  But I don't know if that feature actually works.

Second best solution is to see if there's some setting I could put on the zfs recv such that it writes the uid/gid for the existing user on the system instead of the one in the stream and redo the two-day send/recv.  I doubt such a thing exists. Obviously, I can't simply chown the live data to the uid/gid given on the new server as that wouldn't also update the snapshots (making them worthless).

Third best I think is figuring out samba, since this wasn't a problem at all with it - just that the server was stuck at a version of the protocol that's now considered obsolete. (As well as other obsolete versions, like openssh)  I've just heard it is hard compared to NFS.

---
Assuming my first idea is best, do I fix the uid/gid by editing /etc/passwd then doing a recursive chown on its home directory; or do I rename the user (3 files in /etc ?), and create a new user with the correct uid/gid?


More information about the clue mailing list