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 in Linux Administration by Mani
45 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by Lohit

Related Questions In Linux Administration

+1 vote
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
• 66,910 points
1,074 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 18 in Linux Administration by Joe
57 views
0 votes
1 answer

how to loop through the content of a file using bash

One of the ways to do it ...READ MORE

answered Feb 15 in Linux Administration by ajs3033
• 7,080 points
50 views
0 votes
1 answer
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
56 views
0 votes
1 answer

How to get octal file permission in linux?

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

answered Jan 3 in Linux Administration by Omkar
• 66,910 points
59 views
0 votes
1 answer

How to install a deb file?

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

answered Apr 1 in Linux Administration by Shaan
17 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.