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 年前檢視次數 194 次
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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南