Re: Run script as root without sudo
- In reply to: Aristedes Maniatis via freebsd-stable : "Re: Run script as root without sudo"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 19 Aug 2021 06:41:39 UTC
> 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’s configinit (like cloud-init) with firstboot_pkgs_list=“sudo” similar to Colin’s example here[1], and then run your script(s) using sudo like you originally expected to. [1]: https://www.daemonology.net/blog/2013-12-09-FreeBSD-EC2-configinit.html Thanks, —Matt >