Portál AbcLinuxu, 12. května 2025 08:45
apt-get install nfs-kernel-server nfs-common echo N > /sys/module/nfs/parameters/nfs4_disable_idmapping echo N > /sys/module/nfsd/parameters/nfs4_disable_idmapping echo "options nfs nfs4_disable_idmapping=0" >> /etc/modprobe.d/nfs.conf echo "options nfsd nfs4_disable_idmapping=0" >> /etc/modprobe.d/nfsd.conf echo "/home/srb srbt.in.firma.cz(rw,sync)" > /etc/exportsV /etc/idmapd.conf je:
[General] Verbosity = 15 Pipefs-Directory = /run/rpc_pipefs [Translation] Method = static [Static] srbt@srbt.in.firma.cz = srbV /etc/default/nfs-common je:
NEED_STATD= STATDOPTS= NEED_IDMAPD=yes NEED_GSSD=Návod radí spustit:
nfsidmap -cale to vypíše:
nfsidmap: 'id_resolver' keyring was not found.Na klientovi to připojuju příkazem:
mount.nfs4 server.in.firma.cz:/home/srb mntf2A výsledkem je občas:
[root@srbt mkdeb]# ls -l mntf2/ celkem 12 drwxr-xr-x 2 nobody nobody 4096 9. lis 09.54 bin drwxr-xr-x 2 nobody nobody 4096 9. lis 16.42 jobs drwxr-xr-x 2 nobody nobody 4096 9. lis 09.54 wwwnebo:
[root@srbt mkdeb]# ls -l mntf2/ celkem 12 drwxr-xr-x 2 10035 513 4096 9. lis 09.54 bin drwxr-xr-x 2 10035 513 4096 9. lis 16.42 jobs drwxr-xr-x 2 10035 513 4096 9. lis 09.54 wwwTak nějak doufám, že se dočkám výsledku:
[root@srbt mkdeb]# ls -l mntf2/ celkem 12 drwxr-xr-x 2 srbt 513 4096 9. lis 09.54 bin drwxr-xr-x 2 srbt 513 4096 9. lis 16.42 jobs drwxr-xr-x 2 srbt 513 4096 9. lis 09.54 wwwNěkteré návody se odkazují na službu nfs-idmap, ale tu v systému nemám.
systemctl | grep rpc run-rpc_pipefs.mount loaded active mounted /run/rpc_pipefs rpcbind.service loaded active running LSB: RPC portmapper replacement rpcbind.target loaded active active RPC Port Mapper(pro idmap tam není nic)
journalctl | grep '\(rpc\|nfs\)' lis 09 16:51:09 server.in.firma.cz nfs-kernel-server[1217]: Exporting directories for NFS kernel daemon...exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "srbt.in.firma.cz:/home/srb". lis 09 16:51:09 server.in.firma.cz nfs-kernel-server[1217]: Assuming default behaviour ('no_subtree_check'). lis 09 16:51:09 server.in.firma.cz nfs-kernel-server[1217]: NOTE: this default has changed since nfs-utils version 1.0.x lis 09 16:51:09 server.in.firma.cz nfs-kernel-server[1217]: . lis 09 16:51:09 server.in.firma.cz kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory lis 09 16:51:09 server.in.firma.cz rpc.mountd[1241]: Version 1.2.8 starting lis 09 16:51:09 server.in.firma.cz nfs-kernel-server[1217]: Starting NFS kernel daemon: nfsd mountd. lis 09 16:51:22 server.in.firma.cz kernel: nfsd: nfsv4 idmapping failing: has idmapd not been started?Službu pro rpc-idmap jsem nenašel, ale zkusil jsem ho pustit ručně a dostal jsem z něj následující výstup:
root@server:~ # rpc.idmapd -f -vvv rpc.idmapd: libnfsidmap: using (default) domain: in.firma.cz rpc.idmapd: libnfsidmap: Realms list: 'IN.FIRMA.CZ' rpc.idmapd: libnfsidmap: processing 'Method' list rpc.idmapd: libnfsidmap: loaded plugin /lib/x86_64-linux-gnu/libnfsidmap/static.so for method static rpc.idmapd: libnfsidmap: processing 'GSS-Methods' list rpc.idmapd: libnfsidmap: loaded plugin /lib/x86_64-linux-gnu/libnfsidmap/static.so for method static rpc.idmapd: Expiration time is 600 seconds. rpc.idmapd: Opened /proc/net/rpc/nfs4.nametoid/channel rpc.idmapd: Opened /proc/net/rpc/nfs4.idtoname/channel (provedl jsem ls -l na klientovi) rpc.idmapd: nfsdcb: authbuf=srbt.in.firma.cz authtype=user rpc.idmapd: nfs4_uid_to_name: final return value is 0 rpc.idmapd: Server : (user) id "10035" -> name "" rpc.idmapd: nfsdcb: authbuf=srbt.in.firma.cz authtype=group rpc.idmapd: nfs4_gid_to_name: final return value is 0 rpc.idmapd: Server : (group) id "513" -> name ""O něco se to snaží, ale stejně netuším, co mu chybí.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.