Not able to access etc sudoers d python file

0 votes

I am trying to add python to sudoers list. I opened the file /etc/sudoers.d/python once and entered some lines. After saving and exiting, I realized these were wrong. I am trying to open the file and make changes but it is not happening. I am getting error:

$ sudo visudo -f /etc/sudoers.d/python

>>> /etc/sudoers.d/python: syntax error near line 1 <<<
sudo: parse error in /etc/sudoers.d/python near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Feb 6, 2019 in Linux Administration by Mani
2,164 views

1 answer to this question.

0 votes

I think your system is not allowing you to access the sudoers file. Maybe because it is broken. Not sure about it. But I have a solution for this that worked for me. I used pkexec. Using pkexec to open the editor allowed me to open the editor and then make the changes. Try this:

pkexec visudo -f /etc/sudoers.d/python
answered Feb 6, 2019 by Lohit

Related Questions In Linux Administration

+2 votes
1 answer

Not able to install npm on Ubuntu

Try installing npm using aptitude: sudo apt install aptitude sudo ...READ MORE

answered Nov 28, 2018 in Linux Administration by Omkar
• 69,220 points
8,295 views
0 votes
1 answer

Not able to install sublime text editor

Delete the following file: /etc/apt/sources.lits.d/sublime-text.list and then try to ...READ MORE

answered Feb 19, 2019 in Linux Administration by Joe
988 views
0 votes
1 answer

not able to run netstat-tnlp in Linux.

Hi@akhtar, In Linux system netstat-tnlp command comes from ...READ MORE

answered Apr 16, 2020 in Linux Administration by MD
• 95,460 points
1,123 views
0 votes
1 answer

Not able to find IP address in VM.

Hi@akhtar, You need to change your network adapter ...READ MORE

answered Jul 8, 2020 in Linux Administration by MD
• 95,460 points
2,809 views
0 votes
1 answer
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,465 views
–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,220 points
2,621 views
0 votes
1 answer

How to install a deb file?

You can install a .deb file with ...READ MORE

answered Apr 1, 2019 in Linux Administration by Shaan
941 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP