# NFSv4: nss_getpwnam: name 'root@localdomain' does not map

## musv

Hi there, 

I think I haven't understood an important thing in NFSv4. I try to mount the root of another machine for cross-compiling reasons, but I get always:

```
nss_getpwnam: name 'root@localdomain' does not map into domain 'blechnet'
```

The big question is: Where is this localdomain set?

My config files (identical on both machines):

```
dns_domain_lo="blechnet"

nis_domain_lo="blechnet"
```

```
Domain = blechnet

[Mapping]

Nobody-User = nobody

Nobody-Group = nobody
```

(The LDAP stuff I have deactivated)

```
127.0.0.1       localhost faultier faultier.blechnet
```

```
/export/root            192.168.109.0/24(rw,fsid=1,nohide,insecure,no_subtree_check,async,no_root_squash)
```

- fsid has to be set, because / is outside of /exports

- / is mounted to /export/root

```
miniding:/root                  /mnt/miniding           nfs4    noauto,rw,intr,noatime,nodiratime,hard,rsize=32768,wsize=32768  0 0
```

When I replace every blechnet with localdomain in these files then it works like a charm. But I guess it's not intended that every domain in the world should be named localdomain. So where's the hidden secret to choose a different domain?

----------

## vaxbrat

My first guess would have been the [general] domain setting in  /etc/idmapd.conf since that's the thing I had to change switching from nfs3 to nfs4 a while back.  Do you use dns service for host mapping or just local files?  Check your /etc/resolv.conf and /etc/nsswitch.conf files for settings.  The whole thing boils down to what getdomainname returns:

```
man 2 getdomainname
```

----------

