QNAP NFSv4 ubuntu mount user mapping

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

QNAP NFSv4 ubuntu mount user mapping

Post by piovrasca » Wed Jan 24, 2018 7:47 pm

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.


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:


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


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:


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


Nobody-User = nobody
Nobody-Group = nogroup

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

New here
Posts: 3
Joined: Wed Apr 01, 2020 12:27 am

Re: QNAP NFSv4 ubuntu mount user mapping

Post by Chisonne » Sun Oct 18, 2020 10:06 pm

Did you ever succeed to get this to work?


Post Reply

Return to “Linux & Unix (NFS)”