N
N
Nabi Alimetov2017-01-09 10:49:07
ubuntu
Nabi Alimetov, 2017-01-09 10:49:07

How to get admin rights after failed editing sudoers in Ubuntu?

Inadvertently changed the file /etc/sudoers. Now I can no longer get admin rights in the system. Error:
:~$ sudo vim /etc/sudoers
>>> /etc/sudoers: syntax error near line 31 <<<
sudo: parse error in /etc/sudoers near line 31
sudo: no valid sudoers sources found, quitting
sudo : unable to initialize policy plugin.
I tried to get rights through pkexec visudo, but also an error occurs after entering the user password:
polkit-agent-helper-1 error response to policykit daemon
Has anyone encountered this problem and what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2017-01-09
@alnabi

A very bad, but in theory working option is to log in as root and edit sudoers from under it (without the sudo command)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question