LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/sudoers parse error (https://www.linuxquestions.org/questions/linux-newbie-8/etc-sudoers-parse-error-680588/)

Alfiow 11-02-2008 01:59 AM

/etc/sudoers parse error
 
Hi

The first indication I had of this problem, was Synaptic refused to run.

In terminal, typing sudo apt-get install packagename, I got this response

sudoers file: syntax error, line 1 <<<
sudo: parse error in /etc/sudoers near line 1

I've searched various forums, and learnt a little about visudo, and booting recovery mode , and entering the root shell to run visudo, but I can't see what the problem is, and also how to edit it, and save the edits.

Trying to run visudo in a terminal brings these responses


alf@Laptop:~$ visudo
visudo: /etc/sudoers: Permission denied
alf@Laptop:~$ su visudo
Unknown id: visudo

I'm running kubuntu, based on ubuntu 8.04

Alf

eth1 11-02-2008 06:11 AM

There seems to be a syntax error in the file /etc/sudoers

You will need to boot into the recovery mode ( the option presented at the Grub menu ) or boot using a recovery disk/Knoppix, mount the partition and view/edit the contents of the file /etc/sudoers

Quote:

cat /etc/sudoers

Alfiow 11-02-2008 10:05 AM

Thanks for the reply


Quote:

Originally Posted by eth1 (Post 3329000)
There seems to be a syntax error in the file /etc/sudoers

that was response when trying to run sudo in terminal.

The problem is now fixed, an additional line had been added before line 1, how it happened , I know know, as I didn't even know about this file until this problem struck.

Further searching brought me to this site

http://www.psychocats.net/ubuntu/fixsudo

very wel laid out, very informative

Alf


All times are GMT -5. The time now is 12:38 PM.