<html><body><div style="font-family: Arial; font-size: 12pt; color: #000000"><div aria-label="Compose body">I'll second Chris' suggestion to look at (use?) the 'usermod' command.&nbsp; If memory serves, I was able to resolve a couple of similar problems that way.<br></div><div aria-label="Compose body"><br></div><div aria-label="Compose body">Good luck.<br></div><div aria-label="Compose body"><br></div><div aria-label="Compose body">T.<br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Chris Fedde" &lt;chris@fedde.us&gt;<br><b>To: </b>Yaverot@computermail.net, "CLUE's mailing list" &lt;clue@cluedenver.org&gt;<br><b>Sent: </b>Tuesday, March 15, 2016 12:58:21 PM<br><b>Subject: </b>Re: [clue] NFS uids? (FreeBSD/Gentoo)<br><div><br></div><div dir="ltr"><div>Changing the UID/GID to be consistent across the nfs clients is probably the best plan.</div>You might want to consider using the usermod (1) command to do the heavy lifting here.<div>Look especially at the -u and -g options.</div><div><br><div>If you have several clients then maybe you want to script the work.&nbsp; For very casual multi-host things I might use ssh in a loop or pssh.</div><div>I'm also a fan of ansible for managing config across a community of systems but front loading this task with that learning might be too much.</div><div><br></div><div>chris</div><div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 1:57 AM, Yaverot <span dir="ltr">&lt;<a href="mailto:Yaverot@computermail.net" target="_blank" data-mce-href="mailto:Yaverot@computermail.net">Yaverot@computermail.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">I'm finally making the transition away from my home OpenSolaris fileserver which I setup apparently in June 2009.<br> The new system is FreeBSD 10.2<br> I've successfully done a zfs send of all the data from the old server.&nbsp; Now I'm trying to set up sharing from it.<br> I'm also taking this opportunity to switch from&nbsp; 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".<br> <br> 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.<br> 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.<br> 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.<br> <br> for my clients (running Gentoo)<br> &nbsp; yaverot:users (1000,100)<br> luckily, it appears they're all the same<br> <br> 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.&nbsp; But I don't know if that feature actually works.<br> <br> 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.&nbsp; 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).<br> <br> 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)&nbsp; I've just heard it is hard compared to NFS.<br> <br> ---<br> 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?<br> _______________________________________________<br> clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank" data-mce-href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br> For information, account preferences, or to unsubscribe see:<br> <a href="http://cluedenver.org/mailman/listinfo/clue" rel="noreferrer" target="_blank" data-mce-href="http://cluedenver.org/mailman/listinfo/clue">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div><br>_______________________________________________<br>clue mailing list: clue@cluedenver.org<br>For information, account preferences, or to unsubscribe see:<br>http://cluedenver.org/mailman/listinfo/clue</div><div><br></div></div></body></html>