← sources

I just made a mistake with AWS, need advice on what to do

source: reddit (reddit:selfhosted)published 2026-09-03 18:12ingested 2026-09-04 02:40

retained text

I just started an AWS instance using Debian and was in the process of hardening it. I installed Tailscale, got it fully authorized, then installed Cockpit. That’s when I realized that since I log in to AWS using a `.pem` key, I don’t have a root user password.

That’s where I messed up. I was following the steps from memory and forgot one vital step: I forgot to set a password for the admin/root account. I then edited the sudoers file to remove `NOPASSWD`, and after that I typed `sudo -k`, which immediately killed my sudo session.

Since I don’t have a password for the account, I can’t run sudo commands anymore.

What can I do to fix this?

document fetched 2026-09-04 00:36 · canonical https://reddit.com/r/selfhosted/comments/1w6f8tu/i_just_made_a_mistake_with_aws_need_advice_on