Help with user ID mapping?

Started by unknown sender on Aug 9, 2018 · 2 messages from 2 authors · Last reply Aug 15, 2018

open the first message on its own page

Message details and related content
Hi All,

I'm trying to get a NFS4 client & server id mapping working right.

My client mounts to a couple of NFS4 servers.

I want to get it setup so that for just ONE of them, files added to or modified on the server BY my local client, logged in EITHER as my user or root, get written with a specific user/group ==  "nobody:users"

I'm pretty sure that all the magic is done with idmapd config.

This is what I put together after reading the docs and a bunch of posts online.  Obviously I'm still doing something wrong.

On my Desktop I have an autofs mount

	cat /etc/auto.nfs4 | grep TEST
		TEST     -fstype=nfs,vers=4,_netdev,rw,proto=tcp,async,soft,cto,user,sec=sys,exec,nosuid,nodev,fsc,forcedirectio,rsize=32768,wsize=32768  nas.my.lan:/data/media1

I've got local users of

	id nobody
		uid=65534(nobody) gid=65533(nobody) groups=65534(nogroup),65533(nobody)

	id testuser
		uid=1000(testuser) gid=100(users) groups=6(disk),0(root),494(serviio),33(video),10(wheel),100(users)

	id root
		uid=0(root) gid=0(root) groups=6(disk),494(serviio),100(users),0(root)

And a mapping config of

	cat /etc/idmapd.conf
		[General]

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

		[Mapping]

		Nobody-User = nobody

78 more lines

Message details and related content
On Thu, Aug 09, 2018 at 11:07:32AM -0700, mrsvd1v4rgo1@airpost.net wrote:
I'm trying to get a NFS4 client & server id mapping working right.

My client mounts to a couple of NFS4 servers.

I want to get it setup so that for just ONE of them, files added to or
modified on the server BY my local client, logged in EITHER as my user
or root, get written with a specific user/group ==  "nobody:users"
You should be able to do that by just adding "all_squash" to the export
options in /etc/exports for that one client.
I'm pretty sure that all the magic is done with idmapd config.
This is a common source of confusion.  NFSv4 idmapping only deals with
names and IDs that are sent in NFSv4 protocol messages--when setting or
getting file owners and groups, or ACLs.

It's the underlying RPC protocol that tells the server who is performing
a given RPC.  That always uses numeric IDs or krb5 principals, and isn't
affected by anything in idmapd.conf.

--b.
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help