Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 428008

Summary: net-fs/nfs-utils-1.2.3-r1: Issues mapping uids and usernames between RHEL5 server and Gentoo client
Product: Gentoo Linux Reporter: Dennis Schridde <devurandom>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=843009
Whiteboard:
Package list:
Runtime testing required: ---

Description Dennis Schridde 2012-07-25 09:45:38 UTC
When I run "chown -R portage: /var/cache/portage" (portage is mounted via NFSv4 from a RHEL5 server) on my Gentoo machine, the uids of the files/directories will be nobody instead of portage.

The issue appears to be that somewhere along the way uid 250 gets misinterpreted as a username, which the server obviously cannot resolve and hence maps to nobody.

I need assistance in debugging this issue further.

Reproducible: Always




gentoo-client # grep /var/cache/portage /etc/fstab
192.168.100.1:/gentoo/portage            /var/cache/portage                  nfs4  defaults,noatime,nodev,noexec,nosuid,noauto  0 0
192.168.100.1:/gentoo/packages-ppc64     /var/cache/portage/packages-ppc64   nfs4  defaults,noatime,nodev,noexec,nosuid,noauto  0 0
192.168.100.1:/gentoo/distfiles          /var/cache/portage/distfiles        nfs4  defaults,noatime,nodev,noexec,nosuid,noauto  0 0

gentoo-client # mount | grep /var/cache/portage
192.168.100.1:/gentoo/portage/ on /var/cache/portage type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.100.51,local_lock=none,addr=192.168.100.1)
192.168.100.1:/gentoo/packages-ppc64/ on /var/cache/portage/packages-ppc64 type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.100.51,local_lock=none,addr=192.168.100.1)
192.168.100.1:/gentoo/distfiles/ on /var/cache/portage/distfiles type nfs4 (rw,nosuid,nodev,noexec,noatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.100.51,local_lock=none,addr=192.168.100.1)

gentoo-client # getent passwd portage
portage:x:250:250:portage:/var/tmp/portage:/bin/false

rhel5-server # getent passwd portage
portage:x:250:250::/dev/null:/sbin/nologin

/var/log/everything/current on Gentoo client:
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_uid: calling nsswitch->name_to_uid_
Jul 25 11:28:03 [rpc.idmapd] nss_getpwnam: name 'portage@MYDOMAIN' domain 'MYDOMAIN': resulting localname 'portage'_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_uid: nsswitch->name_to_uid returned 0_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_uid: final return value is 0_
Jul 25 11:28:03 [rpc.idmapd] Client c: (user) name "portage@MYDOMAIN" -> id "250"
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_gid: calling nsswitch->name_to_gid_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_gid: nsswitch->name_to_gid returned 0_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_gid: final return value is 0_
Jul 25 11:28:03 [rpc.idmapd] Client c: (group) name "portage@MYDOMAIN" -> id "250"
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_uid: calling nsswitch->name_to_uid_
Jul 25 11:28:03 [rpc.idmapd] nss_getpwnam: name 'nobody@MYDOMAIN' domain 'MYDOMAIN': resulting localname 'nobody'_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_uid: nsswitch->name_to_uid returned 0_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_uid: final return value is 0_
Jul 25 11:28:03 [rpc.idmapd] Client c: (user) name "nobody@MYDOMAIN" -> id "65534"
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_gid: calling nsswitch->name_to_gid_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_gid: nsswitch->name_to_gid returned 0_
Jul 25 11:28:03 [rpc.idmapd] nfs4_name_to_gid: final return value is 0_
Jul 25 11:28:03 [rpc.idmapd] Client c: (group) name "nobody@MYDOMAIN" -> id "65534"

/var/log/messages on RHEL5 server:
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfsdcb: authbuf=192.168.100.0/24,192.168.100.51 authtype=user
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_uid_to_name: calling nsswitch->uid_to_name 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_uid_to_name: nsswitch->uid_to_name returned 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_uid_to_name: final return value is 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]:  Server: (user) id "250" -> name "portage@MYDOMAIN"
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfsdcb: authbuf=192.168.100.0/24,192.168.100.51 authtype=group
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_gid_to_name: calling nsswitch->gid_to_name 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_gid_to_name: nsswitch->gid_to_name returned 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_gid_to_name: final return value is 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]:  Server: (group) id "250" -> name "portage@MYDOMAIN"
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfsdcb: authbuf=192.168.100.0/24,192.168.100.51 authtype=user
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_uid_to_name: calling nsswitch->uid_to_name 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_uid_to_name: nsswitch->uid_to_name returned 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_uid_to_name: final return value is 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]:  Server: (user) id "99" -> name "nobody@MYDOMAIN"
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfsdcb: authbuf=192.168.100.0/24,192.168.100.51 authtype=group
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_gid_to_name: calling nsswitch->gid_to_name 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_gid_to_name: nsswitch->gid_to_name returned 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_gid_to_name: final return value is 0 
Jul 25 11:28:02 navier rpc.idmapd[26248]:  Server: (group) id "99" -> name "nobody@MYDOMAIN"
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfsdcb: authbuf=192.168.100.0/24,192.168.100.51 authtype=user
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_name_to_uid: calling nsswitch->name_to_uid 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nss_getpwnam: name '250' domain 'MYDOMAIN': resulting localname '(null)' 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nss_getpwnam: name '250' does not map into domain 'MYDOMAIN' 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_name_to_uid: nsswitch->name_to_uid returned -22 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_name_to_uid: final return value is -22 
Jul 25 11:28:02 navier rpc.idmapd[26248]:  Server: (user) name "250" -> id "99"
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfsdcb: authbuf=192.168.100.0/24,192.168.100.51 authtype=group
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_name_to_gid: calling nsswitch->name_to_gid 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_name_to_gid: nsswitch->name_to_gid returned -22 
Jul 25 11:28:02 navier rpc.idmapd[26248]: nfs4_name_to_gid: final return value is -22 
Jul 25 11:28:02 navier rpc.idmapd[26248]:  Server: (group) name "250" -> id "99"
Jul 25 11:28:09 navier dhcpd: DHCPINFORM from 130.75.26.165 via eth2: not authoritative for subnet 130.75.26.128

Portage 2.1.10.65 (default/linux/powerpc/ppc64/10.0/64bit-userland, gcc-4.5.3, glibc-2.14.1-r3, 3.4.5-gentoo ppc64)
=================================================================
System uname: Linux-3.4.5-gentoo-ppc64-Cell_Broadband_Engine,_altivec_supported-with-gentoo-2.1
Timestamp of tree: Unknown
distcc 3.1 powerpc64-unknown-linux-gnu [enabled]
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r2, 3.2.3
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-local sunrise
ACCEPT_KEYWORDS="ppc64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-pipe -O2 -mcpu=cell -mabi=altivec"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -O2 -mcpu=cell -mabi=altivec"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--usepkg --buildpkg --binpkg-respect-use --with-bdeps y --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features
-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
PKGDIR="/var/cache/portage/packages-ppc64"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage/gentoo"
PORTDIR_OVERLAY="/var/cache/portage/local /var/cache/portage/overlays/sunrise"
[...]
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Dennis Schridde 2012-07-25 09:51:48 UTC
It also appears that the transmission of usernames from the server to the client works, as they appear correctly as "portage". Only when changing uids of files on the client, the server maps it to the wrong uid.

gentoo-client # eix -ec nfs-utils
[I] net-fs/nfs-utils (1.2.3-r1@07/20/12)

rhel5-server # rpm -q nfs-utils
nfs-utils-1.0.9-60.el5

gentoo-client # uname -r
3.4.5-gentoo

rhel5-server # uname -r
2.6.18-308.11.1.el5
Comment 2 Dennis Schridde 2012-07-25 09:58:58 UTC
# cat /etc/redhat-release 
CentOS release 5.8 (Final)

Cross posted on RedHat bugzilla as bug #843009.