Problems mapping UIDs & GIDs across NFS using NIS

Matt Adams matta at emerchant.ca
Sat Oct 26 04:28:59 EST 2002


Hi:

I've recently set up an NFS server and would like to use NIS to
handle the permissions etc.  I've set up the NFS exports as per
the instructions, with the map_nis=internal.domain.ca set properly
in the server exports file.   NIS appears to be working fine.
I can do an id [username] on both server and client and end up
with identical values.  

The problem arrises when I mount an NFS export on the client.  
The following is what I get when I list the contents of the mount point:

total 32
drwxr-xr-x    3 root     root         4096 Oct  7 14:04 backup
drwx------    2 4294967294 4294967294    16384 Oct  3 16:23 lost+found
drwxr-xr-x   20 4294967294 4294967294     4096 Oct 20 19:26 madams
lrwxrwxrwx    1 4294967294 4294967294       19 Oct 16 13:05 robl 
drwxr-xr-x    4 4294967294 4294967294     4096 Oct 16 12:25 samba
drwxr-xr-x    6 root     root         4096 Oct 15 14:46 smbshare

Does anyone have any ideas as to why I'm getting these extremely long
uid/gids?  This issue also seems to prevent me from getting proper
r/w access to the data.  I'd appreciate any suggestions or comments
anyone might have!  

I get the following interesting entries from the yp server daemon 
when I access the mounted export on the client:

192.168.0.15 is my NFS/NIS client (workstation1.internal.domain.ca)
127.0.0.1 and 192.168.0.1 represent my NFS/NIS server (kingston.domain.ca)

===BEGIN LOG
[Welcome to the NYS YP Server, version 1.3.12 (with securenets)]
Find securenet: 255.0.0.0 127.0.0.0
Find securenet: 255.255.255.255 127.0.0.1
Find securenet: 255.255.255.0 192.168.0.0
ypserv.conf: 0.0.0.0/0.0.0.0:shadow.byname:2:0:2
ypserv.conf: 0.0.0.0/0.0.0.0:passwd.adjunct.byname:2:0:2
ypserv.conf: 0.0.0.0/0.0.0.0:*:0:0:2
ypproc_domain_nonack("internal.domain.ca") [From: 192.168.0.15:32791]
connect from 192.168.0.15
	-> OK.
ypproc_domain_nonack("internal.domain.ca") [From: 127.0.0.1:2943]
connect from 127.0.0.1
	-> OK.
ypproc_match(): [From: 127.0.0.1:814]
		domainname = "internal.domain.ca"
		mapname = "hosts.byname"
		keydat = "kingston.domain.ca"
connect from 127.0.0.1
	db_open("internal.domain.ca", "hosts.byname")
		->Returning OK!
Opening: internal.domain.ca/hosts.byname (0) 80561f8
ypdb_close() called
	-> Value = "192.168.0.1	kingston.domain.ca kingston"
ypproc_match(): [From: 127.0.0.1:814]
		domainname = "internal.domain.ca"
		mapname = "services.byservicename"
		keydat = "nfs/udp"
connect from 127.0.0.1
	db_open("internal.domain.ca", "services.byservicename")
		->Returning OK!
Opening: internal.domain.ca/services.byservicename (1) 80bd298
ypdb_close() called
	-> Error #-3
ypproc_all_2_svc(): [From: 127.0.0.1:817]
		domain = "internal.domain.ca"
		map = "services.byname"
connect from 127.0.0.1
ypdb_close_all() called
	db_open("internal.domain.ca", "services.byname")
		->Returning OK!
Opening: internal.domain.ca/services.byname (0) 80561f8
	 -> First value returned.
ypdb_close() called
sig_child: got signal 17
pid=30743
children = 0
ypproc_match(): [From: 127.0.0.1:817]
		domainname = "internal.domain.ca"
		mapname = "services.byservicename"
		keydat = "mount/udp"
connect from 127.0.0.1
Found: internal.domain.ca/services.byservicename (0)
ypdb_close() called
	-> Error #-3
ypproc_match(): [From: 127.0.0.1:823]
		domainname = "internal.domain.ca"
		mapname = "hosts.byaddr"
		keydat = "192.168.0.15"
connect from 127.0.0.1
	db_open("internal.domain.ca", "hosts.byaddr")
		->Returning OK!
Opening: internal.domain.ca/hosts.byaddr (2) 8124308
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:824]
		domainname = "internal.domain.ca"
		mapname = "hosts.byname"
		keydat = "workstation1.internal.domain.ca"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byname (2)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:825]
		domainname = "internal.domain.ca"
		mapname = "hosts.byaddr"
		keydat = "192.168.0.15"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byaddr (0)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:826]
		domainname = "internal.domain.ca"
		mapname = "hosts.byname"
		keydat = "workstation1.internal.domain.ca"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byname (2)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_all_2_svc(): [From: 127.0.0.1:820]
		domain = "internal.domain.ca"
		map = "services.byname"
connect from 127.0.0.1
ypdb_close_all() called
	db_open("internal.domain.ca", "services.byname")
		->Returning OK!
Opening: internal.domain.ca/services.byname (0) 80561d0
	 -> First value returned.
ypdb_close() called
sig_child: got signal 17
pid=30746
children = 0
ypproc_match(): [From: 127.0.0.1:829]
		domainname = "internal.domain.ca"
		mapname = "hosts.byaddr"
		keydat = "192.168.0.15"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byaddr (0)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:830]
		domainname = "internal.domain.ca"
		mapname = "hosts.byname"
		keydat = "workstation1.internal.domain.ca"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byname (2)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:831]
		domainname = "internal.domain.ca"
		mapname = "hosts.byaddr"
		keydat = "192.168.0.15"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byaddr (0)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:832]
		domainname = "internal.domain.ca"
		mapname = "hosts.byname"
		keydat = "workstation1.internal.domain.ca"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byname (2)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_domain("internal.domain.ca") [From: 192.168.0.15:613]
connect from 192.168.0.15
	-> Ok.
ypproc_match(): [From: 192.168.0.15:825]
		domainname = "internal.domain.ca"
		mapname = "hosts.byname"
		keydat = "kingston"
connect from 192.168.0.15
Found: internal.domain.ca/hosts.byname (2)
ypdb_close() called
	-> Value = "192.168.0.1	kingston.domain.ca kingston"
ypproc_match(): [From: 127.0.0.1:833]
		domainname = "internal.domain.ca"
		mapname = "hosts.byaddr"
		keydat = "192.168.0.15"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byaddr (0)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
ypproc_match(): [From: 127.0.0.1:827]
		domainname = "internal.domain.ca"
		mapname = "passwd.byname"
		keydat = "XL"
connect from 127.0.0.1
	db_open("internal.domain.ca", "passwd.byname")
		->Returning OK!
Opening: internal.domain.ca/passwd.byname (3) 80bd250
ypdb_close() called
	-> Error #-3
ypproc_match(): [From: 127.0.0.1:828]
		domainname = "internal.domain.ca"
		mapname = "passwd.byuid"
		keydat = "1000"
connect from 127.0.0.1
	db_open("internal.domain.ca", "passwd.byuid")
		->Returning OK!
Opening: internal.domain.ca/passwd.byuid (4) 81f2408
ypdb_close() called
	-> Value = "madams:VDLk3dl3d.:1000:1000:Matt Adams,,,:/home/madams:/bin/bash"
ypproc_match(): [From: 192.168.0.15:828]
		domainname = "internal.domain.ca"
		mapname = "passwd.byuid"
		keydat = "-2"
connect from 192.168.0.15
Found: internal.domain.ca/passwd.byuid (0)
ypdb_close() called
	-> Error #-3
ypproc_domain("internal.domain.ca") [From: 127.0.0.1:812]
connect from 127.0.0.1
	-> Ok.
ypproc_match(): [From: 127.0.0.1:834]
		domainname = "internal.domain.ca"
		mapname = "hosts.byaddr"
		keydat = "192.168.0.15"
connect from 127.0.0.1
Found: internal.domain.ca/hosts.byaddr (2)
ypdb_close() called
	-> Value = "192.168.0.15	workstation1.internal.domain.ca workstation1"
===END LOG


FWIW, I'm running Linux 2.2.20raid on the NFS server (userspace) 
and Linux 2.4.18 on the NFS client.  Both the server and client 
are using the same version of NFS utils, i.e. 2.2beta47.  I'm 
using NIS versions yp-tools-2.5, ypserv-1.3.12 and ypbind-mt-1.8


Thanks in advance,

Matt
-- 
Matt Adams <matta at emerchant.ca>
Systems Administrator, eMerchant.ca Inc.




More information about the linux-nisplus mailing list