Re: Strange behaviour when starting ntp

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Fri, 23 Sep 2022 07:07:52 UTC
On Fri, Sep 23, 2022 at 2:50 AM Olivier <Olivier.Nicole@cs.ait.ac.th> wrote:

>
> Thanks Dave,
>
> On Wed, Sep 21, 2022 at 12:30 PM Dave Cottlehuber <dch@skunkwerks.at>
> wrote:
> >
> > On Wed, 21 Sep 2022, at 03:55, Olivier wrote:
> > > Hi,
> > > Many machines that have a directory /root/.acme.sh behave that same
> way.
> >
> > It doesn't do this here:
> >
> > # mkdir -p /root/.acme.sh
> > # touch /root/.acme.sh/acme.sh.csh
> > # chmod 000 /root/.acme.sh/acme.sh.csh
> > # cd /etc
> > # exit
> > $ sudo sh -x /etc/rc.d/ntpd restart
> >
> > - check your env vars when in sudo, esp $TERM and $HOME
>
> fbsd63<on>39: sudo env | grep -i home
>
> PATH=.:/home/on/bin:/home/on:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/etc:/usr/local/sbin:/usr/local/bin/java:/home/corse/telelogic/bin:/usr/local/etc/bin
> HOME=/root
> fbsd63<on>40: sudo env | grep -i term
> TERM=xterm
> fbsd63<on>41: sudo env | grep -i acme
> fbsd63<on>42: sudo grep acme /usr/local/etc/sudoers
> fbsd63<on>43:
>
> > - run with -x as above, and see what file(s) are being included
>
> It ends with the only reference to acme.sh toward the end:
>
> ...
> + eval $' limits -C daemon  su -m ntpd -c \'sh -c "/usr/sbin/ntpd  -p
> /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"\''
> + limits -C daemon su -m ntpd -c 'sh -c "/usr/sbin/ntpd  -p
> /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g"'
> /root/.acme.sh/acme.sh.csh: Permission denied.
> + _return=0
> + [ 0 -ne 0 ]
> + return 0
> + _run_rc_postcmd
> + [ -n '' ]
> + return 0
> + [ -n '' ]
> + return 0
> + _return=0
> + [ 0 -ne 0 ]
> + _run_rc_postcmd
> + [ -n '' ]
> + return 0
> + return 0
> fbsd63<on>44:
>
> I should add that one machine that has a "dirty" kernel (I am not sure
> why it is dirty) does not show that behaviour.
>
> Best regards,
>
> Olivier
>
>
> >
> > It's a very odd path to look into, indeed.
>
> --
>
>


This is awfully familiar:
https://github.com/acmesh-official/acme.sh/issues/2049

Admittedly this is in regards to mysql, but the problems seems a lot like
this.
Specifically the following comment:  "The installer added the following
line to end of .cshrc file"

Is your .cshrc `virgin' ?

~Paul


-- 
__________________

:(){ :|:& };: