Upgraded 11.2 -> 12.0, ntpd Won't Start

Matthias Oestreicher matthias at smormegpa.no
Sat Mar 16 23:16:42 UTC 2019


Am Samstag, den 16.03.2019, 22:39 +0000 schrieb B J:
> On 3/15/19, B J <va6bmj at gmail.com> wrote:
> > Before I did the upgrade, I ran ntpd by putting
> > 
> > ntpd_enable="YES"
> > 
> > in:
> > 
> > /etc/rc.conf
> > 
> > Now, when I boot my computer, I get:
> > 
> > Security policy loaded: MAC/ntpd (mac_ntpd)
> > Starting ntpd.
> > su: unknown login: ntpd
> > /etc/rc: WARNING: failed to start ntpd
> > 
> > The upgrade to 12.0 was done with the following:
> > 
> > freebsd-update fetch
> > freebsd-update install
> > freebsd-update -r 12.0-RELEASE upgrade
> > 
> > I restarted the machine and ran:
> > 
> > /usr/sbin/freebsd-update install
> > 
> > when prompted to do so.  I also reinstalled all the packages and, I
> > believe, ports.  I didn't, however, run mergemaster or:
> > 
> > pwd_mkdb -p /etc/master.passwd
> > 
> > nor do I recall being prompted to do so during the upgrading process.
> > (Maybe I wasn't paying attention.)
> > 
> > Can I get ntpd to run if I ran:
> > 
> > pwd_mkdb -p /etc/master.passwd
> > 
> 
> <snip>
> 
> Thanks to everyone who responded.  Your comments and suggestions were
> most helpful.
> 
> I ran:
> 
> pwd_mkdb -p /etc/master.passwd
> 
> on one of my computers and rebooted it when it was done.  I got the
> following message in the startup output:
> 
> ntpd[755]: pid file /var/db/ntp/ntpd.pid: Permission denied
> 
> I checked the file and found that the file has the number 789 in it.
> 
> By comparison, I have two systems that have fresh installations of
> FreeBSD 12.0.  Neither of them had the problem with ntpd that I
> mentioned in my original post.  I just checked the file on one of them
> and found that it has the number 885.
> 
> My question, now, is this:  is the condition mentioned in the message
> I got on the upgraded machine a problem?  Is the difference in the
> ntpd.pid files something to be concerned about?
> 
> Meanwhile, the computer's clock appears to be running properly as I
> reset my watch and the both are synchonized, so it seems that problem
> has been resolved.
> 
>From /usr/ports/updating in FreeBSD 12.0-RELEASE

20180719:
        New uid:gid added, ntpd:ntpd (123:123).  Be sure to run mergemaster
        or take steps to update /etc/passwd before doing installworld on
        existing systems.  Do not skip the "mergemaster -Fp" step before
        installworld, as described in the update procedures near the bottom
        of this document.  Also, rc.d/ntpd now starts ntpd(8) as user ntpd
        if the new mac_ntpd(4) policy is available, unless ntpd_flags or
        the ntp config file contain options that change file/dir locations.
        When such options (e.g., "statsdir" or "crypto") are used, ntpd can
        still be run as non-root by setting ntpd_user=ntpd in rc.conf, after
        taking steps to ensure that all required files/dirs are accessible
        by the ntpd user.

% grep ntpd /etc/group
ntpd:*:123:

The ntpd user is missing when you are upgrading from pre FreeBSD 12-RELEASE.
Create the group and you should be fine.

Regards
Matthias

> Thanks.
> 
> BMJ
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"





More information about the freebsd-questions mailing list