The system is Ubuntu 22.04.2.
I mistakenly removed my user from sudoers, and the root account cannot login directly.
Now, if I use the “sudo” command, “user is not in the sudoers file. This incident will be reported.” will be displayed.
I only have read-only permission to system files.
I tried to add my account to sudoers file, but shown Permission denied.
Is there any way to restore my user to sudoers?
sudoers screenshot
New contributor
Hector is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.