Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nfs 4 user mapping
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Sat Feb 23, 2013 7:09 pm    Post subject: nfs 4 user mapping Reply with quote

Hallo,

ich möchte zu nfs 4 wechseln um endlich das Usermappingproblem zu lösen.

Export und mount funktioniert schon. Nur das Usermapping funktioniert nicht. Finde aber auch keine Howtos speziell für Gentoo.
Kann mir jemand einen Tipp geben wie das eingerichtet wird.

Im Kernel habe ich alle nfs4 Optionen aktiviert unter Netzwerk Dateisysteme.

Code:

[ebuild   R    ] net-libs/libnfsidmap-0.24  USE="ldap -static-libs" 0 kB
[ebuild   R    ] net-fs/nfs-utils-1.2.6  USE="ipv6 nfsv4 tcpd caps -kerberos nfsdcld nfsidmap nfsv41 (-selinux)" 0 kB


Code:
 zcat /proc/config.gz | grep -i nfs
# CONFIG_USB_FUNCTIONFS is not set
CONFIG_NFS_FS=m
CONFIG_NFS_V2=m
CONFIG_NFS_V3=m
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=m
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_PNFS_FILE_LAYOUT=m
CONFIG_PNFS_BLOCK=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y



Code:
 lsmod | grep nfs
nfsv4                 158403  1
auth_rpcgss            29613  1 nfsv4
nfs                   135196  2 nfsv4
fscache                35827  2 nfs,nfsv4
lockd                  58440  1 nfs
sunrpc                187958  26 nfs,auth_rpcgss,lockd,nfsv4


Mehr fällt mir nicht ein ;-)
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Sat Feb 23, 2013 11:00 pm    Post subject: Reply with quote

"Das Usermappingproblem"?
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Mon Feb 25, 2013 9:57 am    Post subject: Reply with quote

Ja, das Usermappingproblem. NFSv4 nutzt dazu den ID-Mapper, den ich aber auch nicht befriedigend zum Laufen gebracht hab. Ich hab's bei mir soweit akzeptabel bekommen, dass gleiche User auf allen Rechnern auch dieselbe User-ID haben. Damit lief's bei mir dann.

Die 2. Baustelle bei NFSv4 ist die Domain. Hab's nie hinbekommen, die Domain ganz rauszulöschen oder eine andere als "localdomain" zu nutzen. Nur damit ging's komischerweise. Woher sich NFS die Domain zieht, war mir schleierhaft. Aus den Netzwerkeinstellungen jedenfalls nicht.
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Mon Feb 25, 2013 4:42 pm    Post subject: Reply with quote

Ich hab mal gegooglelt was ihr unter dem Problem verstehen könntet, definiert hats keiner von euch ;-)
Wie es aussieht wird der ID Mapper missverstanden, da er nur für eine konsistente ls Ausgabe sorgt, jedoch nicht für deckungsgleiche ACLs. Will man das, was muss man wohl zusätzlich Kerberos einsetzen.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Tue Feb 26, 2013 11:53 am    Post subject: Reply with quote

Zur Aufklärung.
Den IDmapper unter nfs4 braucht man um gleiche Nutzernamen innerhalb einer Domain mit unterschiedlichen ID's den Lese und Schreib Zugriff auf eine NFS Freigabe zu ermöglichen.
Das Angleichen der ID's bringt wieder andere Probleme mit sich. Ich mußte dafür dann z.B. nochmal auf alle USER Dateien einen chown -R laufen lassen.

Was ich bisher herausgefunden habe:

Das nfs-server Modul muß auch auf dem Client geladen werden:

siehe hier:

https://bugs.gentoo.org/show_bug.cgi?id=431252

Meine Module liste enthält:

cat /etc/conf.d/modules | grep nfs

Code:

modules="nfsd nfsv4 nfs_acl"



Kernelconfig:

zcat /proc/config.gz | grep -i nfs
Code:


# CONFIG_USB_FUNCTIONFS is not set
CONFIG_NFS_FS=m
CONFIG_NFS_V2=m
CONFIG_NFS_V3=m
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=m
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_PNFS_FILE_LAYOUT=m
CONFIG_PNFS_BLOCK=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y


egrep ^passwd:\|^group: /etc/nsswitch.conf
Code:


passwd:      compat
group:       compat



grep -v '^#' /etc/idmapd.conf | grep -v '^$'

Code:
[General]
Domain = fritz.box
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = nsswitch
 
[Static]
[UMICH_SCHEMA]
LDAP_server = ldap-server.local.domain.edu
LDAP_base = dc=local,dc=domain,dc=edu


Last edited by Tinitus on Tue Feb 26, 2013 1:38 pm; edited 2 times in total
Back to top
View user's profile Send private message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Tue Feb 26, 2013 11:57 am    Post subject: Reply with quote

Interessante Links zum Thema:

http://www.citi.umich.edu/projects/nfsv4/linux/

http://linux-nfs.org/wiki/index.php/Main_Page

hier Hinweise zum Kernelbau:

http://www.citi.umich.edu/projects/nfsv4/linux/kernel-build.html

Die wichtigsten Hinweise und Fragen findet man hier:


http://www.citi.umich.edu/projects/nfsv4/linux/using-nfsv4.html

Auf dem Server sollen folgende Dienste laufen:

On your server, run rpc.mountd, rpc.svcgssd, rpc.idmapd, and rpc.nfsd:
rpc.mountd
rpc.idmapd
rpc.svcgssd
rpc.nfsd 8

Auf dem Client:
On the client, run rpc.gssd and rpc.idmapd:
rpc.gssd -m
rpc.idmapd


Unter Gentoo heißen die aber anders:
Code:

rpc.gssd     rpc.idmapd   rpc.pipefs   rpc.statd    rpc.svcgssd



Welcher ist der Richtige?
Back to top
View user's profile Send private message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Tue Feb 26, 2013 12:00 pm    Post subject: Reply with quote

Hier noch ein paar Hinweise:

Kerberos:

http://www.citi.umich.edu/projects/nfsv4/linux/faq/

nsswitch:

http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html

Dann von hier:
https://forums.gentoo.org/viewtopic-t-896828-highlight-.html

/etc/request-key.conf modifizieren:

create id_resolver * * /usr/sbin/nfsidmap %k %d 600

Bloß welche USE Flags muß ich für die Pakete nehmen?

ich habe jetzt mal (einmal mit kerberos einmal ohne):

nano /etc/portage/package.use

Code:
net-fs/nfs-utils nfsv4 tcpd kerberos nfsdcld nfsidmap nfsv41 caps
=net-libs/libtirpc-0.2.2-r1 kerberos

net-fs/nfs-utils nfsv4 tcpd nfsdcld nfsidmap nfsv41 caps
net-libs/libnfsidmap -ldap



um zu testen was der idmap schon tut soll das Script helfen:

cat ./idmap.sh
Code:

#!/bin/sh
echo "Name-id cached entries:"
cachedir=/proc/net/rpc/nfs4.idtoname
cat ${cachedir}/content




Kann jemand mit den ganzen Info's was anfangen?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum