Re: ntpd as ntpd user question

From: Ian Lepore <ian_at_freebsd.org>
Date: Sat, 21 Jul 2018 11:14:45 -0600
On Sat, 2018-07-21 at 10:11 -0700, Pete Wright wrote:
> 
> On 07/21/2018 09:47, Ian Lepore wrote:
> > 
> > On Sat, 2018-07-21 at 09:41 -0700, Pete Wright wrote:
> > > 
> > > hello - i am testing out the new ntpd that was committed
> > > yesterday and
> > > am attempting to run as non-root.  i've created a ntpd
> > > user/group, and
> > > verified permissions look good on pertinent directories.  i am
> > > running
> > > into an issue with the rc script tho - it's complaining about
> > > multiple
> > > pid files being specified?
> > > 
> > > $ sudo /etc/rc.d/ntpd start
> > > Starting ntpd.
> > > ntpd error:  only one pidfile option allowed
> > > ntpd - NTP daemon program - Ver. 4.2.8p11
> > > Usage:  ntpd [ - [] | --[{=| }] ]... \
> > >           [  ...  ]
> > > Try 'ntpd --help' for more information.
> > > /etc/rc.d/ntpd: WARNING: failed to start ntpd
> > > 
> > > 
> > > has anyone else seen this issue? not sure if this is an issue
> > > with my
> > > local config or not, i've read through the rc script and its not
> > > obvious
> > > to me yet why it may be getting multiple pid arguments passed. 
> > > the only
> > > relevant bit i have set in rc.conf is:
> > > 
> > > $ grep ntpd /etc/rc.conf
> > > ntpd_enable="YES"
> > > 
> > > 
> > > thanks!
> > > -pete
> > > 
> > You say you created an ntpd user/group, that seems to imply you
> > didn't
> > run mergemaster (which would have done that). If that's the case,
> > you
> > probably also didn't get /etc/defaults/rc.conf updated, so it still
> > has
> > the old ntpd_flags that includes the pidfile (which is now provided
> > by
> > the startup script and shouldn't be set in ntpd_flags).
> > 
> > If all of that is the wrong guess, let me know and we'll figure it
> > out.
> that's Ian - that's most likely it (defaults/rc.conf).  i did run 
> mergemaster but i suspect i didn't run it correctly b/c it didn't
> copy 
> over any files, nor create the ntpd uid/gid.  my buildworld script
> does 
> a "mergemaster -m $CHECKOUT -a".  i'll re-read the man page today
> and 
> update my scripts accordingly.
> 
> thanks again for the bread-crumb!
> -pete
> 

There's a "pre-world" stage of mergemaster (-Fp option I think) which
isn't needed often, but one of the times it is needed is apparently
when new user ids are added.  (So I've been told, I've never much used
mergemaster myself). I think there are some words about it at the very
bottom of UPDATING.

-- Ian
Received on Sat Jul 21 2018 - 15:14:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC