I have a running AWS vm. The only access I have is using the ssh key (.pem file) to log in as ec2-user which is an unprivileged user. From there, I could user the sudo command without a password.
Somehow, passwordless sudo got disabled and it is asking me for the ec2-user password. But this password was never set, it is scrambled.
- How do I regain root/sudo access? Or am I forced to start from scratch?
- How did this happen? I never touched the /etc/sudoers file