Answer the question
In order to leave comments, you need to log in
How to make pkexec visudo work?
Slam file
>>> /etc/sudoers: syntax error near line 33 <<<
sudo: parse error in /etc/sudoers near line 33
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
[email protected]:~$ pkexec visudo
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/sbin/visudo' as the super user
Authenticating as: ,,, (user)
Password: enter user password
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freed esktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
Answer the question
In order to leave comments, you need to log in
Open two SSH sessions
In the first session, get the bash PID by running:
echo $$
In the second session, start the authentication agent with:
pkttyagent --process (pid from step 2)
Back in the first session, run:
pkexec visudo
In the second session, you will get a prompt password. Visudo will start in the first session.
visudo had to be used before it broke (so as not to break).
Now option 1 is to login as root .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question