2 Answers
- Newest
- Most votes
- Most comments
0
From aws console > instance > connect user: change to "root" > connect
chown root:root /etc/sudo.conf chown root:root /etc/sudoers chown -R root:root /etc/sudoers.d
Now you should be able to run sudo
command using ec2-user
account
answered 2 years ago
0
From aws console > instance > connect user: change to "root" > connect
This ^ is inaccessible for me.
Alternative method:
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-sudo-commands/ - I used the "Debian-based" script, but their commands are incomplete.
I simply added (to the bottom) the commands that @kenng provided, and that worked for those specific files & folders. However, in my case I also needed to add:
chown root:root /usr/libexec/sudo
chown -R root:root /usr/libexec/sudo/sudoers.so
answered a year ago
Relevant content
- asked 6 months ago
- asked a month ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago