QNAP NFSv4 ubuntu mount user mapping

Discussion about using NAS on Linux and Unix OS.
Post Reply
piovrasca
First post
Posts: 1
Joined: Wed Jan 24, 2018 7:31 pm

QNAP NFSv4 ubuntu mount user mapping

Post by piovrasca »

I'm unable to map client username to server username when I mount a QNAP storage on Ubuntu client with NFSv4 (I don't want to use the UID correspondence). In my case neither the UID and the username are equal in both the client and the server.

SERVER (QNAP):

I've enabled NFSv4 sharing, then I've configured a shared directory(`shared_dir`) with:

- Host/IP/Network = <client IP addr>
- Permissions = r/w
- Squash option = NO_ROOT_SQUASH


I've modified the file /sys/module/nfs/parameters/nfs4_disable_idmapping from 'Y' to 'N' (according to what I read on other forum answers).

I've rebooted the QNAP

I HAVEN'T modified the file /etc/idmapd.conf that currently is like this:

[General]

Verbosity = 9
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain


[Mapping]

Nobody-User = guest
Nobody-Group = guest


CLIENT (Ubuntu 16.04):

nfs-common was already installed, so as for the server I wrote 'N' in /sys/module/nfs/parameters/nfs4_disable_idmapping.

In addition I've modified the file /etc/idmapd.conf like this:

[General]

Verbosity = 0
Pipefs-Directory = /run/rpc_pipefs
# set your own domain here, if id differs from FQDN minus hostname
Domain = localdomain

[Mapping]

Nobody-User = nobody
Nobody-Group = nogroup

[Translation]
Method=static
[Static]
jameswhite@<QNAP IP addr> = james

Then I've performed the restart with service nfs-idmapd restart (I don't know why it ask me to authenticate for `org.freedesktop.systemd1.manage-units`, but I think this is not relevant for my problem)

Finally I've mounted the QNAP with:

sudo mount -v -t nfs4 <QNAP IP addr>:/shared_dir /mnt/shared_dir
Chisonne
New here
Posts: 4
Joined: Wed Apr 01, 2020 12:27 am

Re: QNAP NFSv4 ubuntu mount user mapping

Post by Chisonne »

Hi
Did you ever succeed to get this to work?

cheers
Charlie
Post Reply

Return to “Linux & Unix (NFS)”