Re: Translate user names with NFS
On Wed, Jun 15, 2011 at 11:39 AM, Camaleón <noelamac@gmail.com> wrote:
> On Tue, 14 Jun 2011 22:14:55 -0400, Dan wrote:
>
>> On Tue, Jun 14, 2011 at 7:56 PM, Dan <ganchya@gmail.com> wrote:
>
> (...)
>
>>> Is there an easy way to translate the user names of the two machines
>>> with NFS?
>>>
>>
>> I think that it should be possible to do the translation with nfs4 using
>> /etc/idmapd.conf
>>
>> This is what I tried, but it didn't work:
>
> (...)
>
> Hum... have you looked at "/usr/share/doc/nfs-common/
> README.Debian.nfsv4"?
>
> At least in Lenny it says that nfsv4 is still fairly new and not fully
> supported yet. But there are also some tips, like that idmapd has to be
> started at both, server and client side.
>
Yes idmapd has to be started on both sides. In order to do that one
has to add NEED_IDMAPD=yes to /etc/default/nfs-common (server and
client), then restart nfs-common
The nice thing about NFS4 is that it converts names to UID and GID. If
you use the original idmapd.conf it will just convert the names of
both machines. Another nice thing about NFS4 is that it does
everything in a single port (2049), so it is easier to do a ssh
tunnel.
If you have the same user (ex. pedro) with the same name but
different UID and GID NFS4 will do the conversion. Therefore I am just
going to sync the names between the two machines. To do that I guess
that I just need to change the file /etc/passwd and /etc/group Should
I update the names somewhere else?
I was hoping to have more flexibility with NFS4 without having to use
LDAP and been able to have different names, GIDs and UIDs in both
machines
This is how it looks now my idmapd.conf
[General]
Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
Reply to: