Ask Your Question
0

sudo , sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"

asked 2017-11-23 12:17:05 -0500

K.Mostafa gravatar image

updated 2018-11-04 03:53:05 -0500

hhlp gravatar image

hello every body , I wanted to edit some files in /usr directory , so i wrote this command : sudo chmod -R 757 /direcory

After that : when i use : sudo in terminal , like : sudo su , sudo yum ...... etc , it 's appear " sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy" "

are there any solution ?

I am appreciate if you helped me , stay happy ....

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-11-24 03:49:28 -0500

masteroman gravatar image

First of, making any file or directory world writable is bad and is bad practice to have it that way. If you ran chmod -R 757 on /usr directory then you basically messed up permissions on all files and folders within /usr directory, which among other things, contains sudo, so that's where the error comes from.

Instead of changing all permissions recursively, you can simply use:

sudo YOURFAVORITETEXTEDITOR FILEYOUWISHTOEDIT

And you'd be able to edit it normally since you're root at that point.

Those permissions should be reverted back to its original value in order to ensure other things aren't broken as well. You can try following this article to fix the issues.

Out of curiosity, which file did you wanted to edit?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-11-23 12:17:05 -0500

Seen: 1,633 times

Last updated: Nov 24 '17