/etc/resolv.conf overwritten by what?

James B. Byrne byrnejb at harte-lyne.ca
Fri Dec 28 16:56:01 UTC 2018


On Fri, December 28, 2018 10:33, Ruben wrote:
> Hi,
>
> Did you look in the other crontab places
>
> - /etc/crontab
> - /etc/crontab.d/*
> - /var/cron/tabs/ (for the non-root users but perhaps with sudo
> breakouts)
>
> There should be a lot of default cronjobs running from /etc/crontab at
> least. Perhaps a recently installed piece of software placed an
> additional job in one of those locations?
>
# ll /var/cron/tabs /etc/crontab /etc/cron.d /usr/local/etc/cron.d
ls: /usr/local/etc/cron.d: No such file or directory
-rw-r--r--  1 root  wheel  730 Oct 24 12:42 /etc/crontab

/etc/cron.d:
total 0

/var/cron/tabs:
total 0

# cat /etc/crontab
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: releng/11.2/etc/crontab 194170 2009-06-14 06:37:19Z brian $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
#
#minute	hour	mday	month	wday	who	command
#
*/5	*	*	*	*	root	/usr/libexec/atrun
#
# Save some entropy so that /dev/random can re-seed on boot.
*/11	*	*	*	*	operator /usr/libexec/save-entropy
#
# Rotate log files every hour, if necessary.
0	*	*	*	*	root	newsyslog
#
# Perform daily/weekly/monthly maintenance.
1	3	*	*	*	root	periodic daily
15	4	*	*	6	root	periodic weekly
30	5	1	*	*	root	periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time.  See adjkerntz(8) for details.
1,31	0-5	*	*	*	root	adjkerntz -a
#EOF


The only custom pkg periodic script is
/usr/local/etc/periodic/daily/111.clean-squirrelmail and that is
disabled.


On Fri, December 28, 2018 10:39, starikarp at yandex.com wrote:

>
> I have in /etc/ file dhclient-enter-hooks which has:
> add_new_resolv_conf() {
>         # We don't want /etc/resolv.conf changed
>         # So this is an empty function
>         return 0
> }
>
> and I do not have problems.
>

dhcp is not enabled on this host.  All addresses are static.

This happened at precisely 09:12:51 which does not seem to me to be a
'cron'ish time.

# stat resolv.conf*
2838222034 189421 -rw-r--r-- 1 root wheel 4294967295 46 "Jul 11
12:05:07 2018" "Dec 28 09:12:51 2018" "Dec 28 09:35:54 2018" "Jul 11
12:05:07 2018" 4096 1 0x800 resolv.conf_empty_problem

I am baffled by this and there seems to have been no other activity on
that host at that time.


-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3



More information about the freebsd-questions mailing list