У меня есть Synology DiskStation (DSM 6.0.2), которая экспортирует общие каталоги через NFSv4. Я указал домен NFSv4 ITET-PHO .
На другом компьютере с Linux (Debian Wheezy) я хочу смонтировать этот экспорт с помощью idmapping. Там у меня есть следующая конфигурация /etc/idmapd.conf:
[General]
Verbosity = 2
Pipefs-Directory = /run/rpc_pipefs
# set your own domain here, if id differs from FQDN minus hostname
Domain = ITET-PHO
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
[Translation]
Method = static
[Static]
erikhe@ITET-PHO = erik
Поэтому я пытаюсь статически сопоставить пользователя erikhe в Synology, который находится в домене ITET-PHO с локальным пользователем erik . Все остальные пользователи не должны отображаться nobody . Однако, когда я монтирую общий каталог, я просто вижу номера UID из Synology:
drwxr-xr-x 4 1566874442 1566573057 4096 Okt  5 10:21 erikhe-301898
Также все остальные UID показываются вместо « nobody . В лог-файле я вижу, что idmap что-то делает. Это происходит при service nfs-common restart:
Oct  5 15:11:07 sisyphous systemd[1]: Stopping LSB: NFS support files common to client and server...
Oct  5 15:11:07 sisyphous nfs-common[6520]: Stopping NFS common utilities: idmapd statd.
Oct  5 15:11:07 sisyphous systemd[1]: Stopped LSB: NFS support files common to client and server.
Oct  5 15:11:07 sisyphous systemd[1]: Starting LSB: NFS support files common to client and server...
Oct  5 15:11:07 sisyphous rpc.statd[6539]: Version 1.2.8 starting
Oct  5 15:11:07 sisyphous sm-notify[6540]: Version 1.2.8 starting
Oct  5 15:11:07 sisyphous sm-notify[6540]: Already notifying clients; Exiting!
Oct  5 15:11:07 sisyphous rpc.idmapd[6551]: libnfsidmap: using domain: ITET-PHO
Oct  5 15:11:07 sisyphous nfs-common[6530]: Starting NFS common utilities: statd idmapdrpc.idmapd: libnfsidmap: using domain: ITET-PHO
Oct  5 15:11:07 sisyphous nfs-common[6530]: rpc.idmapd: libnfsidmap: Realms list: 'ITET-PHO'
Oct  5 15:11:07 sisyphous nfs-common[6530]: rpc.idmapd: libnfsidmap: processing 'Method' list
Oct  5 15:11:07 sisyphous nfs-common[6530]: rpc.idmapd: libnfsidmap: loaded plugin /lib/x86_64-linux-gnu/libnfsidmap/static.so for method static
Oct  5 15:11:07 sisyphous rpc.idmapd[6551]: libnfsidmap: Realms list: 'ITET-PHO'
Oct  5 15:11:07 sisyphous rpc.idmapd[6551]: libnfsidmap: processing 'Method' list
Oct  5 15:11:07 sisyphous rpc.idmapd[6551]: libnfsidmap: loaded plugin /lib/x86_64-linux-gnu/libnfsidmap/static.so for method static
Oct  5 15:11:07 sisyphous rpc.idmapd[6552]: Expiration time is 600 seconds.
Oct  5 15:11:07 sisyphous rpc.idmapd[6552]: Opened /proc/net/rpc/nfs4.nametoid/channel
Oct  5 15:11:07 sisyphous nfs-common[6530]: .
Oct  5 15:11:07 sisyphous rpc.idmapd[6552]: Opened /proc/net/rpc/nfs4.idtoname/channel
Oct  5 15:11:07 sisyphous systemd[1]: Started LSB: NFS support files common to client and server.
Oct  5 15:11:07 sisyphous rpc.idmapd[6552]: New client: fa
Oct  5 15:11:07 sisyphous rpc.idmapd[6552]: New client: fb
Oct  5 15:11:07 sisyphous rpc.idmapd[6552]: Opened /run/rpc_pipefs/nfs/clntfb/idmap
И когда я монтирую экспорт с помощью mount.nfs4 cerberous:/volume1/homes /mnt/test я получаю:
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: New client: fc
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: New client: fd
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: New client: fe
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: Stale client: fe
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: #011-> closed /run/rpc_pipefs/nfs/clntfe/idmap
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: Stale client: fd
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: #011-> closed /run/rpc_pipefs/nfs/clntfd/idmap
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: Stale client: fc
Oct  5 15:11:19 sisyphous rpc.idmapd[6552]: #011-> closed /run/rpc_pipefs/nfs/clntfc/idmap
Как сделать так, чтобы отображение идентификаторов (хотя бы статическое) работало в Debian? Отображение идентификаторов должно работать с Synology в целом. В конце концов я хотел бы автоматически сопоставить пользователей Synology с пользователями LDAP на компьютере с Linux.
