From nobody Thu Aug 19 08:46:55 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 CBCC9176AFB5 for ; Thu, 19 Aug 2021 08:47:02 +0000 (UTC) (envelope-from ari@ish.com.au) Received: from mail.ish.com.au (mail.ish.com.au [203.29.62.212]) (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 4Gqz0Q51Hwz4RK9; Thu, 19 Aug 2021 08:47:02 +0000 (UTC) (envelope-from ari@ish.com.au) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ish.com.au; s=mail; h=In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID :Content-Type:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7uMlozfrt5+QzFzpZlwJuUXP2cTdyyQOlSTUrIKgEWA=; b=C7NUjtsqp93dFpsmmRgqnFyeyj V5xw64xgFOnJV9JwIIjEunCnl/baarwMtO6UqH3P0vWTOSLTFZDDN05nMYCAXVVr9xbPuwdkvZXDQ /ZMnYY6ap3Xh9Kbg6asOkeF/SJlL7xTwIPC54ZeHzhrKOPaKsiu6IHGt0TJYzMttDQwCzlMbOwsNw SPtijZvsux/KkN9wyTvTeBAsp7qhhKJiG7t+ecSVmvFbab/RQgdNM29I+udkTp9T1xxwXIl8Ev6i3 K0eo25uVWnOVbVboCCwnLC8sEwrlKC/ZClsf9YTPGQkvjhMFpuEIqgq/A3wjOsZfiTIJ2qZvxOF6d tZIh2eVg==; Received: from [10.242.2.3] by mail.ish.com.au with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1mGdhQ-0002bu-LB; Thu, 19 Aug 2021 18:46:56 +1000 Content-Type: multipart/alternative; boundary="------------EanryzOwFEHnvyX2gb6DxPJ8" Message-ID: <5e990c53-2dbc-48ab-749f-2478d96620ae@ish.com.au> Date: Thu, 19 Aug 2021 18:46:55 +1000 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 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Thunderbird/92.0 Subject: Re: Run script as root without sudo Content-Language: en-AU To: Andriy Gapon , freebsd-stable References: <50738b08-8179-46d6-24fe-b2674e4f6c67@FreeBSD.org> In-Reply-To: X-Rspamd-Queue-Id: 4Gqz0Q51Hwz4RK9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Reply-To: ari@ish.com.au From: Aristedes Maniatis via freebsd-stable X-Original-From: Aristedes Maniatis X-ThisMailContainsUnwantedMimeParts: Y This is a multi-part message in MIME format. --------------EanryzOwFEHnvyX2gb6DxPJ8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Oh!!! -c is a csh option.... Someone had to have created that command structure as a practical joke on a co-worker back in about 1975... Let's make the login user optional, but if you opt not to use it the next argument works completely differently. Now that I understand it, I see which parts of the man page I didn't read clearly. And then on top of that the linux su command actually has a -c option, so of course all those docs out there are leading in the wrong direction. Thanks for your help. Ari On 19/8/21 6:35pm, Andriy Gapon wrote: >> What is -c supposed to do? > I thought that I answered that question, even before you asked, with the > second quote from the manual page. > --------------EanryzOwFEHnvyX2gb6DxPJ8--