How to get to root after switched to new user without being in ubuntu's sudoers

0

This is frustrating when I added a new user, then su newuser, couldn't go back to root by all means. It says not in sudoers afterwards. I've no root password, neither able to login from putty, it said login as ubuntu which rejected key, but i can login as newuser into newuser account. I sent 3 emails to support, no response. Hope I can do something here since my website is down for days.

已提问 2 年前207 查看次数
1 回答
3

Try to fix the files by attaching the volume to another running instance. Basically, you stop the instance, detach the boot volume, attach the volume to the running instance, mount it to the OS, the fix the sudoers or /etc files. Then do the reverse. Also, you can attempt to connect to the Serial Console to fix the files.

profile pictureAWS
专家
kentrad
已回答 2 年前
profile pictureAWS
专家
已审核 2 年前
  • Hi, serial console still requires user login, but how do I get into the root? Could I assign password to root user or access Sudoers file directly?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容