From nobody Thu Aug 19 06:41:39 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 22F8F1776BEB for ; Thu, 19 Aug 2021 06:41:50 +0000 (UTC) (envelope-from matt.garber@gmail.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GqwCy0MWDz3QXM for ; Thu, 19 Aug 2021 06:41:50 +0000 (UTC) (envelope-from matt.garber@gmail.com) Received: by mail-qk1-x72d.google.com with SMTP id p22so6031865qki.10 for ; Wed, 18 Aug 2021 23:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bDXDGhlC0IE9mUt1XMh3yhc7Prh52hDVvFyrh6GTpac=; b=EyfD1Kxks66XFDn/bW0vq1EEyBgU3XlfQakqlm4kN0poXbdN5uJxCv41x+lws/DCyg 3dh91LlI/gtUjLwIg2auOJFBQlpuDx8PXDh6QlhE31lwbRLdXtictUSU+wb9kB1LsclS qYp7OoxgHMdorWapoCiSx0cxTepApJ5Li6HLSvonZTlXRIbTyDC/ZPVXIlksLFwoKgUv QFPc9XQTTtFLj9JQOO+QmT6gwWz5d8Tvh61ll9zGpKTb9XxDVloLpLCffpOveysZKwOD zTOph7hdvp31Z27xKVYO2CbphEgxBXdvEUquAa6GNTMXpb3ivkr+G/8dBjKM0cf/Wl4G ZcFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bDXDGhlC0IE9mUt1XMh3yhc7Prh52hDVvFyrh6GTpac=; b=BLdWtkvgArXP8bs5YVQ5jccdzmfV5joIqtrDmFygUkoMw2M9Z2TpJk7n947/+c4jw2 NjkZE3ZU3Ez49N1WqReKYyZwHe8F7Lisnn+B9xOEs/qe3nTzNFYDrGO+wOPKswrQMNY6 JhKX/L0VMzrrP+xDIGEo3KrFD7JaDCNI/LmOuv1TufVy0jS2vzXCuVHaDRyq4HRxGiMi LKWGG7iSg8QlbOUD2VzgLN6lc8+Irgx/lgsjmIXiZ2lHxq2vGwcLnyiIUNs5zwqdltoN PEUU6upq/A4Ik1nSGnUe6dh3Kp7DJp+mnMucS1gkBi/Y9CincABCyrWQnEGyrVUoHi1v LVHQ== X-Gm-Message-State: AOAM531dFrCkqoc1wjwGxYoxqwrExX3dxfmdU0zTC1IzhWlynHaymtgO gq5s8abPs7vyxhcdqzjjOwB6QDCaRh9Pck7f2Y2XDagT X-Google-Smtp-Source: ABdhPJxEWcnm28BOYRs/WDg8FgINc8RVHi5dj1TaHq6pY0Vg9TtkS6i2ZaG5Op0CWwKRPBRf3KU+FCzMwGOzh594D0c= X-Received: by 2002:a37:6317:: with SMTP id x23mr2270592qkb.432.1629355309732; Wed, 18 Aug 2021 23:41:49 -0700 (PDT) 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 References: In-Reply-To: From: Matt Garber Date: Thu, 19 Aug 2021 02:41:39 -0400 Message-ID: Subject: Re: Run script as root without sudo To: ari@ish.com.au Cc: freebsd-stable Content-Type: multipart/alternative; boundary="00000000000073197805c9e3d8f7" X-Rspamd-Queue-Id: 4GqwCy0MWDz3QXM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --00000000000073197805c9e3d8f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > That would require root to put the file there and then to reboot the > machine. > > Ari As these are EC2 instances, you should be able to use user-data provided to the instance=E2=80=99s configinit (like cloud-init) with firstboot_pkgs_lis= t=3D=E2=80=9Csudo=E2=80=9D similar to Colin=E2=80=99s example here[1], and then run your script(s) usi= ng sudo like you originally expected to. [1]: https://www.daemonology.net/blog/2013-12-09-FreeBSD-EC2-configinit.htm= l Thanks, =E2=80=94Matt > --00000000000073197805c9e3d8f7--