Removal of (passwordless) `sudo` prevents becoming root in EC2
Spinning up an EC2 based on Alpine 3.14.3 - AMI ami-01babdca642cd3d50 (aarch64), ami-071e77bbab4a1fde2 (x86_64)
has sudo available and allows passwordless sudo access to become root from the default EC2 alpine
user (eg sudo apk update
).
Doing the same from an Alpine 3.15.0 - AMI ami-07f3e47d07f544833 (aarch64), ami-08f4abd198c1c407e (x86_64)
, sudo is not installed in the image and so is not possible to escalate to root - su
prompts for a password that is not known (or at least not obviously documented).
alpine@ip-xxx-xxx-xxx-xxx:~$ sudo echo test
-sh: sudo: not found
alpine@ip-xxx-xxx-xxx-xxx:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
alpine@ip-xxx-xxx-xxx-xxx:~$ cat /etc/alpine-release
3.15.0
Would it be possible to reinclude sudo in these images by default to support the same standard passwordless sudo workflow as most other EC2 images, or document on the cloud page what the alternate approach is?