While writing a script to edit the sudoers file without using visudo
, the script did not check for issue, and I have introduced some bad edits into the sudoers
file, and thus cannot use sudo at all anymore. (I know I did a very bad thing, and should probably have used something like this)
Question: Is there anyway I can recover from this mistake, or do I have to destroy the VM and start from scratch with a new one?
sudo
command, the ec2-user cannot perform any root command, which is the core of the issue (perhaps it was confusing!)