getting error using sudo commends. Explained below
/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 |
There is an error in line 31 of your /etc/sudoers file.
If you post it, we can help. Without seeing the file, it is hard to guess what the error might be. :) |
And, sadly, when there is an error in the sudoers file, it can be literally impossible to fix unless you can somehow gain full root access to the server.
|
what did you change in sudoers file? whatever it is , it is located near or at line 31 ....
|
Depending on your distro, there will be different ways around that. Most involve booting from the rescue disc or USB-stick that you have handy and fixing sudoers. When editing that file, it is a good idea to use the program "visudo" instead of directly working on it. You can still lock yourself out while using "visudo" but at least it will not be because of a syntax errror as it prevents those.
|
Ask the admin of the machine.
|
Quote:
on a local machine, booting into "recovery mode" should do it. but i agree, if this is a server, it's ... what was the netspeak abbreviation ... SOL, or contact the admin. |
boot a different linux, USB one.
mount that drive then go in and edit it in god mode. save, exit, reboot the effected system, in like flint. |
If you had used visudo to edit the /etc/sudoers file it would have prompted you if you made any errors before you could exit out of it. This way is alot more safer cus in case you made a mistake you will know beforehand, and be able fix it before it becomes an issue.
|
Quote:
|
possibly able to open terminal and issue:
Code:
su - root Code:
visudo Lines can be commented if prefaced with a "#" After editing sudoers using visudo correctly saving the file, in the terminal, type Code:
exit |
All times are GMT -5. The time now is 11:51 AM. |