2016/3/7

idmapping -- nfs with user permission

from http://serverfault.com/questions/514118/mapping-uid-and-gid-of-local-user-to-the-mounted-nfs-share


This is what idmapping is suppose to do. First of all, enable is on the client and server:
# echo N > /sys/module/nfs/parameters/nfs4_disable_idmapping
clean idmap cache and restart idmap daemon:
# nfsidmap -c
# service rpcidmapd restart
Now on server and the client will send instead of numeric IDs string principals like bob@YOURDOMAIN.COM. You need to have bob account on the both hosts - client and server. Nevertheless, the numeric ID's can be different.

shareimprove this answer
answered Sep 30 '14 at 5:32

kofemann
1,163717

Ftr, on nfs server the path is /sys/module/nfsd/parameters/nfs4_disable_idmapping (nfsd, not nfs) – Mike Purcell Dec 21 '15 at 19:42

原來 idmapd 要而外啟動,
ref: http://jamyy.us.to/blog/2014/03/6166.html

環境:
Server: CentOS / Fedora
Client: Debian / Ubuntu
Server
# yum install nfs-utils
# vi /etc/idmapd.conf
Domain = localdomain
# vi /etc/exports
/path *(rw,sync,no_root_squash,no_subtree_check)
# exportfs -rv
# service rpcbind start
# service nfs start
# chkconfig nfs on
# chkconfig rpcbind on
Client
$ sudo apt-get install nfs-common
$ sudo vi /etc/idmapd.conf
Domain = localdomain
$ sudo service nfs-common restart (Debian)
或
$ sudo service idmapd restart (Ubuntu 12.04)
Ubuntu 13.10 只要改好 /etc/idmapd.conf 立即生效, 無需其他操作
$ mount -t nfs4 remote:/path /local/mount/point

其他:

沒有留言:

張貼留言