Re: ntpd as ntpd user question

From: Ian Lepore <ian_at_freebsd.org>
Date: Sun, 22 Jul 2018 10:34:12 -0600
On Sat, 2018-07-21 at 15:09 -0700, bob prohaska wrote:
> On Sat, Jul 21, 2018 at 12:14:10PM -0600, Ian Lepore wrote:
> > 
> > 
> > I can't see any way that installkernel would lead to the complaint
> > about the ntpd user not existing; that check is tied to the
> > installworld target.
> > 
> My mistake. I was sleepy and in a hurry. The error message was in
> installworld
> and my attempt to adduser ntpd concluded with an error:
> Locked     : yes
> OK? (yes/no): yes
> pw: Bad id 'ntpd': invalid
> adduser: ERROR: There was an error adding user (ntpd).
> On reboot the old ntpd set the clock and I thought all was well.
> 
> The failure is a little surprising, is ntpd a reserved name?
> 
> The machine is re-running buildworld/installworld from a clean start,
> so presumably it'll halt over the same error again. When that
> happens, 
> what's the simplest way to recover? Mergemaster is a big hammer,
> something
> less comprehensive might suffice, even manual editing of files.  
> 
> There's minimal customization on the machine, basically /etc/fstab, 
> /etc/rc.conf and /etc/passwd. Nothing else of real value, so if I
> kill 
> it in the attempt it won't be a disaster.
> 
> 
> Thanks for waking me to my blunder...
> 
> bob prohaska
>  

The important changes that mergemaster would handle are:

  - add ntpd user, id 123
  - add ntpd group, id 123
  - set ntpd_flags="" in /etc/defaults/rc.conf
  - install the new /etc/rc.d/ntpd

You can add the user by doing vipw and pasting the ntpd line from
/usr/src/etc/master.passwd, IMO easier than doing adduser and answering
all the questions.

-- Ian
Received on Sun Jul 22 2018 - 14:34:22 UTC

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