NSSWITCH(_nsdispatch): ... not found, and no fallback provided

NSSWITCH(_nsdispatch) fills /var/log/cron
Code:
# uname -srp
FreeBSD 9.1-RELEASE-p2 i386
# cat /var/log/cron
Jul  7 10:00:00 LH64 /usr/sbin/cron[65596]: (root) CMD (newsyslog)
Jul  7 10:00:00 LH64 /usr/sbin/cron[65598]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:00:00 LH64 cron[65596]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:00:00 LH64 /usr/sbin/cron[65597]: (operator) CMD (/usr/libexec/save-entropy)
Jul  7 10:00:00 LH64 cron[65598]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:00:00 LH64 cron[65597]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:05:00 LH64 /usr/sbin/cron[65624]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:05:00 LH64 cron[65624]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:10:00 LH64 /usr/sbin/cron[65641]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:10:00 LH64 cron[65641]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:11:00 LH64 /usr/sbin/cron[65646]: (operator) CMD (/usr/libexec/save-entropy)
Jul  7 10:11:00 LH64 cron[65646]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:15:00 LH64 /usr/sbin/cron[65669]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:15:00 LH64 cron[65669]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:20:00 LH64 /usr/sbin/cron[65687]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:20:00 LH64 cron[65687]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:22:00 LH64 /usr/sbin/cron[65695]: (operator) CMD (/usr/libexec/save-entropy)
Jul  7 10:22:00 LH64 cron[65695]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:25:00 LH64 /usr/sbin/cron[65716]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:25:00 LH64 cron[65716]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:30:00 LH64 /usr/sbin/cron[65732]: (root) CMD (/usr/libexec/atrun)
Jul  7 10:30:00 LH64 cron[65732]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided
Jul  7 10:33:00 LH64 /usr/sbin/cron[65743]: (operator) CMD (/usr/libexec/save-entropy)
Jul  7 10:33:00 LH64 cron[65743]: NSSWITCH(_nsdispatch): files, passwd_compat, endpwent, not found, and no fallback provided


I have no clue what could cause these errors. Any hints are appreciated. The system was recently upgraded, but I cannot tell if this is related to this problem.
 
I forgot how I fixed other systems before:
Code:
# cat /etc/nsswitch.conf
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: src/etc/nsswitch.conf,v 1.3.2.1.4.2 2012/11/17 08:47:00 svnexp Exp $

# as there is no NIS server on this domain, NIS is commented out here after
# logfiels have been full of nis errors 2013/06/03

#group: compat
#group: nis [notfound=return] files
group: files
#group_compat: nis
group_compat: files
hosts: cache files dns
networks: files
#passwd: compat
#passwd: nis [notfound=return] files
passwd: files
#passwd_compat: nis
passwd_compat: files
shells: files
services: compat
#services_compat: nis
services_compat: files
protocols: files
rpc: files

@fonz: thanks for teaching native English. I was wondering where ressources go to.
 
Remove the compat entries if you're not using NIS. This is what my /etc/nsswitch.conf looks like on a system that is compiled with WITHOUT_NIS=1:

Code:
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: stable/9/etc/nsswitch.conf 224765 2011-08-10 20:52:02Z dougb $
#
group: files
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
networks: files
passwd: files
shells: files
services: files
protocols: files
rpc: files

The only thing that the _compat entries do is to add support +/- fields for passwd and group (I think also services but never seen it used). Also the nsswitch.conf(5) manual page states the if you use a compat entry for any source it has to be the only entry for the source. So what you have is actually an error:

Code:
group: files
#group_compat: nis
group_compat: files

It should be like this if you want to keep the compat entry:

Code:
group: compat
group_compat: nis

But like I said it's easier to just remove the compat entry and use files directly.
 
Back
Top