From nobody Fri Sep 23 07:41:39 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MYkcS6qGsz4dYdQ for ; Fri, 23 Sep 2022 07:41:44 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MYkcS2BX1z3Y43 for ; Fri, 23 Sep 2022 07:41:44 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (localhost [127.0.0.1]) by mail.cs.ait.ac.th (Postfix) with ESMTP id DCEAB112506; Fri, 23 Sep 2022 14:41:40 +0700 (+07) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= content-type:content-type:mime-version:message-id:date:date :in-reply-to:subject:subject:from:from:received:received :received; s=selector1; t=1663918900; x=1665733301; bh=PAwX+TwGU y/Mw63lqwCKqPtQ/W3VXWQ3CQbaf2mRWcc=; b=BW/eyhDmKI6FXdxAIKNEyT4pY BjjCl1BY5vSR51+aPREYHhSoFqEXSQsEK5eYkNe9MeKMvSF0p7IxL0SvKyRNL1Qh yRiM4L2hTZOiwloBCX0XlleAcnP+abtMEwdCt3kFjveZgc7Q8AnPqcI9QK05+hqh 7J/zm6E1BuCECf4VuY= X-Virus-Scanned: amavisd-new at cs.ait.ac.th Received: from mail.cs.ait.ac.th ([127.0.0.1]) by mail.cs.ait.ac.th (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mR8rCcbDvhUd; Fri, 23 Sep 2022 14:41:40 +0700 (+07) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id 379DF112505; Fri, 23 Sep 2022 14:41:40 +0700 (+07) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.15.2/8.15.2/Submit) id 28N7fdgO044781; Fri, 23 Sep 2022 14:41:39 +0700 (ICT) (envelope-from on@banyan.cs.ait.ac.th) From: Olivier To: Paul Procacci Cc: freebsd-questions@freebsd.org Subject: Re: Strange behaviour when starting ntp In-Reply-To: (message from Paul Procacci on Fri, 23 Sep 2022 03:07:52 -0400) Date: Fri, 23 Sep 2022 14:41:39 +0700 Message-ID: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4MYkcS2BX1z3Y43 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.ait.ac.th header.s=selector1 header.b="BW/eyhDm"; dmarc=pass (policy=none) header.from=cs.ait.ac.th; spf=pass (mx1.freebsd.org: domain of Olivier.Nicole@cs.ait.ac.th designates 192.41.170.16 as permitted sender) smtp.mailfrom=Olivier.Nicole@cs.ait.ac.th X-Spamd-Result: default: False [-4.70 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[cs.ait.ac.th,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[192.41.170.16:from]; R_SPF_ALLOW(-0.20)[+mx:c]; R_DKIM_ALLOW(-0.20)[cs.ait.ac.th:s=selector1]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[cs.ait.ac.th:+]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:4767, ipnet:192.41.170.0/24, country:TH] X-ThisMailContainsUnwantedMimeParts: N Thank you Paul, Paul Procacci writes: > [1:text/plain Show] > > > [2:text/html Hide Save:noname (8kB)] > > On Fri, Sep 23, 2022 at 2:50 AM Olivier wrote: > > Thanks Dave, > > On Wed, Sep 21, 2022 at 12:30 PM Dave Cottlehuber > 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 > > fbsd6339: 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 > fbsd6340: sudo env | grep -i term > TERM=xterm > fbsd6341: sudo env | grep -i acme > fbsd6342: sudo grep acme /usr/local/etc/sudoers > fbsd6343: > > > - 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 > fbsd6344: > > 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 That was it. > 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' ? It was not that virgin anymore. Best regards, Olivier > > ~Paul --