Re: (Hopefully) quick policy question

Mihai Moldovan <[email protected]> Wed, 27 Sep 2023 15:48:38 +0200
Newsgroups gmane.comp.tools.sudo.user
Message-ID <[email protected]>
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--===============6320576473562348827==
Content-Language: en-US
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="------------dkENnJmIji8CSpq0Uf0qc60D"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------dkENnJmIji8CSpq0Uf0qc60D
Content-Type: multipart/mixed; boundary="------------HYSbGuHHbFh0VkVvtyaLr2NW";
 protected-headers="v1"
From: Mihai Moldovan <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
Subject: Re: [sudo-users] (Hopefully) quick policy question
References: <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
In-Reply-To: <[email protected]>

--------------HYSbGuHHbFh0VkVvtyaLr2NW
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

* On 9/27/23 01:46, Jore wrote:
> On 27/9/23 8:29 am, Mihai Moldovan wrote:
>> * On 9/26/23 20:18, Jore wrote:
>>>      test ALL =3D NOPASSWD: /usr/bin/bash /home/test/acme-wrapper.sh =
*
>>>
>>>
>>> Regardless, when test user runs:
>>>
>>> $ bash /home/test/acme-wrapper.sh foobar123.example.com
>>> /usr/bin/bash: /root/.acme.sh/acme.sh: Permission denied
>>>
>> Because you probably meant to execute sudo bash /home/test/acme-wrappe=
r.sh
>> foobar123.example.com? :)
>=20
> But I did execute that.
>=20
> If you check the wrapper script, it calls '/root/.acme.sh/acme.sh' whic=
h=20
> isn't being run as superuser, which is the error reported as above.
>=20
> What am I doing wrong here?

You're just missing the sudo call in front to execute the script as the s=
uper
user. A/the normal user naturally wouldn't be able to execute the script =
in
/root/.acme.sh, as you've already correctly determined.



Mihai

--------------HYSbGuHHbFh0VkVvtyaLr2NW--

--------------dkENnJmIji8CSpq0Uf0qc60D
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEbhHQj3UzgcdE8cg8H9Yu2W4lOocFAmUUMrYFAwAAAAAACgkQH9Yu2W4lOodr
BA/8CgzBzqVI/dVUWtTEMuXGKLWO1YtwrPPv6pXY3Ca78AGk3tYwQTOia/wD4wZ+IC+W2voz3t2Q
fojZ5FocuAp/h1ksLMiravDkvWpSQ/pM0oIJmpIGSlHN51kyGrxhMP6yo2W4yAFuvNR3eTFBZHAD
sNCPGBJ3PLCILu/aML4JLPcO+SXtC/0HJ+k7XneEO3HQq7BNNiWfBfAdoQ1SYkZMR1LsTEgjfr2Z
cXHImdaB58nUDIPx6Wl9Yq1VKbhZGi1lzs7kAtAo3alV++L0O73m8pafR2zwJJVbhUx3l1e77vz1
3mHiXp5fV44BByGEG39IiiC7cnske46AeJmkuMQnZPygL0X6759bhoBqKJ4mIWdRHgWAUl3K/yAe
FUtAHIh5IChfcLoxS2M3F1F5UaMqPWGqKhgVTk+FcGpZZoiEJFLArP6I1Pm2Iv6+VoHo590Q/Dlb
mH//FfT5RaFlWas4ipuUeKvunhC1d8D+7CopaB7fLHPF5ebcA33WMKrbz4CVY/hKSxNV3XUubENF
0UMVGIgNdt6EbXpT85PYJrw66IzKMjjpYpIjVRae2F1PkgVOX1QnaUznz1ACEBMMEtH822nKwdVx
mD23n+qc/6wn2nX3I1xdXyNRa3TIeM5n8XIicQENirBmH1lTl82uVdz1IJIBzj7Bn3BaWAhTNxri
tjg=
=80RN
-----END PGP SIGNATURE-----

--------------dkENnJmIji8CSpq0Uf0qc60D--

--===============6320576473562348827==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

____________________________________________________________
sudo-users mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-users

--===============6320576473562348827==--