nfs4 idmapping 與 sss

nfs4 idmapping 與 sss

我們有一台實施 NFS4 ACL 的戴爾企業文件伺服器。我可以掛載 NFS4 目錄,並且 nfs4_setfacl 和 nfs4_getfacl 正常工作。不幸的是,我無法讓 ls 清單正常工作。我已經啟用了 id 映射:

echo 0 > /sys/module/nfs/parameters/nfs4_disable_idmapping

並配置/etc/idmapd

[General]
Verbosity = 10
Pipefs-Directory = /run/rpc_pipefs
# set your own domain here, if it differs from FQDN minus hostname
Domain = example.com
[Translation]
Method = sss
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup

/etc/request-key.d/id_resolver.conf 已配置

當我對已安裝的檔案執行 ls -l 時,請求鍵使用“localhost”而不是“example.com”

nfsidmap -l

3 .id_resolver keys found:
uid:root@localhost
uid:gweatherby@localhost
gid:wheel@localhost

有人知道如何進行這項工作嗎?


弄清楚了:

我在 nfs4_setfacl 命令中使用網域名稱。例如

nfs4_setfacl -a A::[電子郵件受保護]:r 檔名

只需使用帳戶名稱即可按需要進行操作

nfs4_setfacl -a A::gweatherby :r 檔名

相關內容