UID/GID mapping on NFS

Lonnie Olson lists at kittypee.com
Thu Feb 6 10:25:59 MST 2014


On Thu, Feb 6, 2014 at 9:05 AM, Levi Pearson <levipearson at gmail.com> wrote:
>> Either way, that's not an option here, really. The scenario here is that
>> you have public machine #1 that user X logs into. He does all sorts of
>> stuff, which is totally authorized by the admin of machine #1. But he wants
>> to be a bit paranoid and only store his files on his private machine, #2.
>> So what he wants to do is have his home directory from machine #2 NFS
>> mounted onto machine #1 (i.e. /home/X/work on #1 = /home/X on machine #2).
>> But X's UID is, let's say, 1049 on #1 and 1002 on #2.
>>
>>
>>
>> What would be the best solution for this?
>>
>
> In that case, the best solution is to not use NFS.

Either don't use NFS, or change the UID on one machine to match the other.

If this was meant to be an example that many users plan to use, you
could either implement a centralized user repository (LDAP, NIS, etc),
or just hack it and copy /etc/{passwd,shadow} to your machines.  It
sounds hackish but can actually work in production with careful
scripting.


More information about the PLUG mailing list