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 réponse
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
EXPERT
kentrad
répondu il y a 2 ans
profile pictureAWS
EXPERT
vérifié il y a 2 ans
  • 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?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions