nsswitch.conf <-> WITHOUT_NIS

Ed Schouten ed at 80386.nl
Thu Aug 4 17:30:57 UTC 2011


Hi folks,

I just noticed cron doesn't work nicely when running a system built
without NIS, since it won't allow you to send emails:

| Aug  4 09:45:00 palm postfix/sendmail[12217]: fatal: www(80): No recipient addresses found in message header
| Aug  4 10:45:00 palm postfix/sendmail[12827]: fatal: www(80): No recipient addresses found in message header
| Aug  4 11:45:00 palm postfix/sendmail[13515]: fatal: www(80): No recipient addresses found in message header
| Aug  4 12:45:00 palm postfix/sendmail[14786]: fatal: www(80): No recipient addresses found in message header
| Aug  4 13:45:01 palm postfix/sendmail[15409]: fatal: www(80): No recipient addresses found in message header
| Aug  4 14:45:00 palm postfix/sendmail[18896]: fatal: www(80): No recipient addresses found in message header

According to various sources, this can be fixed by properly
configuration your nsswitch.conf. Now my question is, how should
nsswitch.conf be adjusted? The src.conf manual page says this:

	If set, you might need to adopt your nsswitch.conf(5) and remove
	‘nis’ entries.

That sort of seems to imply that you can just remove these lines:

	group_compat: nis
	passwd_compat: nis
	services_compat: nis

But on the other hand, nsswitch.conf says it will default to `nis'
anyway. So I suspect the lines shouldn't be removed, but changed to
`files', right? Maybe we should consider modifying the configuration
file accordingly?

--- etc/Makefile
+++ etc/Makefile
@@ -256,6 +256,9 @@ distribution:
 	    ${DESTDIR}/boot/device.hints
 .endif
 .endif
+.if ${MK_NIS} == "no"
+	sed -i "" -e 's/nis/files/' ${DESTDIR}/etc/nsswitch.conf
+.endif
 
 distrib-dirs:
 	mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20110804/1237782d/attachment.pgp


More information about the freebsd-current mailing list