From nobody Thu Aug 19 08:41:37 2021 X-Original-To: freebsd-stable@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 DA5ED17699C3 for ; Thu, 19 Aug 2021 08:41:47 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from mail.punkt.de (mail.punkt.de [IPv6:2a00:b580:8000:11:1c6b:7032:35e9:5616]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqytM54J8z3vjJ for ; Thu, 19 Aug 2021 08:41:47 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from smtpclient.apple (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.punkt.de (Postfix) with ESMTPSA id 0076F203FE; Thu, 19 Aug 2021 10:41:38 +0200 (CEST) Content-Type: text/plain; charset=utf-8 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Run script as root without sudo From: "Patrick M. Hausen" In-Reply-To: Date: Thu, 19 Aug 2021 10:41:37 +0200 Cc: freebsd-stable Content-Transfer-Encoding: quoted-printable Message-Id: References: <50738b08-8179-46d6-24fe-b2674e4f6c67@FreeBSD.org> To: ari@ish.com.au X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4GqytM54J8z3vjJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Ari, > Am 19.08.2021 um 10:33 schrieb Aristedes Maniatis via freebsd-stable = : >=20 > The man page is very confusing. Yes, it says -c is class. But it also = has examples like this: > [...] > What is -c supposed to do? Everything after the user name is handed to /bin/sh. So it's executing sh -c command ... That's why it doesn't work without -c in most cases. Kind regards, Patrick --=20 punkt.de GmbH Patrick M. Hausen .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109500 https://infrastructure.punkt.de info@punkt.de AG Mannheim 108285 Gesch=C3=A4ftsf=C3=BChrer: J=C3=BCrgen Egeling, Daniel Lienert, Fabian = Stein