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.

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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠