Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2022 13:50:16 +0700
From:      Olivier <Olivier.Nicole@cs.ait.ac.th>
To:        freebsd-questions@freebsd.org
Subject:   Re: Strange behaviour when starting ntp
Message-ID:  <wu7mtaqvb2v.fsf@banyan.cs.ait.ac.th>
In-Reply-To: <wu7zgetwfdm.fsf@banyan.cs.ait.ac.th> (message from Olivier on Wed, 21 Sep 2022 10:55:17 %2B0700)

next in thread | previous in thread | raw e-mail | index | archive | help

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.

-- 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wu7mtaqvb2v.fsf>