# libnfsidmap: Unable to determine the NFSv4 domain

## Massimo B.

Hello everybody,

every ~20 minutes I see a block like this in my syslog:

```
Jul 02 09:00:26 [nfsidmap] libnfsidmap: Unable to determine the NFSv4 domain; Using 'localdomain' as the NFSv4 domain which means UIDs will be mapped to the 'Nobody-User' user defined in /etc/idmapd.conf

Jul 02 09:00:26 [nfsidmap] libnfsidmap: using (default) domain: localdomain

Jul 02 09:00:26 [nfsidmap] libnfsidmap: Realms list: 'LOCALDOMAIN' 

Jul 02 09:00:26 [nfsidmap] libnfsidmap: loaded plugin /usr/lib64/libnfsidmap/nsswitch.so for method nsswitch

Jul 02 09:00:26 [nfsidmap] nss_getpwnam: name 'root@intra.foobar.com' does not map into domain 'localdomain'

Jul 02 09:00:26 [nfsidmap] libnfsidmap: Unable to determine the NFSv4 domain; Using 'localdomain' as the NFSv4 domain which means UIDs will be mapped to the 'Nobody-User' user defined in /etc/idmapd.conf

Jul 02 09:00:26 [nfsidmap] libnfsidmap: using (default) domain: localdomain

Jul 02 09:00:26 [nfsidmap] libnfsidmap: Realms list: 'LOCALDOMAIN' 

Jul 02 09:00:26 [nfsidmap] libnfsidmap: loaded plugin /usr/lib64/libnfsidmap/nsswitch.so for method nsswitch

Jul 02 09:00:26 [nfsidmap] nss_name_to_gid: name 'root@intra.foobar.com' does not map into domain 'localdomain'

```

However nfs is working, what is missing here, how can I fix that?

I'm using autofs for all cifs, nfs and mobile storages. All mounts in my /etc/autofs/auto.nfs are working fine.

----------

## mike155

Does it help to specify your 'domain' in /etc/idmapd.conf?

```
# The following should be set to the local NFSv4 domain name

# The default is the host's DNS domain name.

Domain = yourdomain.com

```

----------

## Massimo B.

I added our Domain there, and eventhough it looks like valid syntax according to man idmapd.conf, I get the additional line in the logs:

```
[nfsidmap] config error at /etc/idmapd.conf:3: ignoring line not in a section
```

----------

## mike155

You probably forgot to put the 'domain' statement into the '[General]' section.

There's an example 'idmapd.conf' in the source tarball (look at /usr/portage/distfiles/nfs-utils-2.*.tar.bz2, file 'support/nfsidmap/idmapd.conf'). Use that file as a template for '/etc/idmapd.conf'.

It seems that emerge doesn't install that file. I created bug 690982.

----------

## Massimo B.

The configuration is accepted now, but the log now still has many entries like

```
Jul 31 07:22:40 [nfsidmap] libnfsidmap: using domain: intra.foobar

Jul 31 07:22:40 [nfsidmap] libnfsidmap: Realms list: 'INTRA.FOOBAR' 

Jul 31 07:22:40 [nfsidmap] libnfsidmap: loaded plugin /usr/lib64/libnfsidmap/nsswitch.so for method nsswitch

Jul 31 07:22:40 [nfsidmap] libnfsidmap: using domain: intra.foobar

Jul 31 07:22:40 [nfsidmap] libnfsidmap: Realms list: 'INTRA.FOOBAR' 

Jul 31 07:22:40 [nfsidmap] libnfsidmap: loaded plugin /usr/lib64/libnfsidmap/nsswitch.so for method nsswitch
```

Is that something about the autofs which I use to mount all mobile devices, nfs and cifs? How can I avoid these verbose logs?

----------

## Massimo B.

My autofs setup about cifs looks like

```
# grep -h -v "^#" /etc/autofs/auto.{master,cifs} | grep cifs

/mnt/cifs  /etc/autofs/auto.cifs --timeout=600 --ghost

home       -fstype=cifs,vers=3.0,username=$CIFSUSER,credentials=$HOME/.pw,uid=$UID,gid=$UID   ://filesrv/User\$/$CIFSUSER
```

Any way to mute nfsidmap from polluting the log files?

----------

