Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-02-2008, 02:59 AM   #1
LQ Newbie
Registered: Oct 2008
Posts: 5

Rep: Reputation: 0
/etc/sudoers parse error


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

Old 11-02-2008, 07:11 AM   #2
Registered: May 2008
Posts: 97

Rep: Reputation: 20
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

cat /etc/sudoers
Old 11-02-2008, 11:05 AM   #3
LQ Newbie
Registered: Oct 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply

Originally Posted by eth1 View Post
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

very wel laid out, very informative



error, parse, sudoers

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: parse error, unexpected '/' - can anyone see the error in this code? v@ny@ Programming 8 04-03-2010 05:07 PM
What's the meaning of "PHP Parse error: parse error, unexpected $ in..." frandalla Programming 23 03-04-2009 01:34 PM
Parse error: parse error, unexpected '}' in /home/content jouvert Linux - Newbie 3 05-17-2008 07:55 PM
Parse error: parse error, unexpected $ in /home/content/d/o/m/domain/html/addpuppy2.p Scooby-Doo Programming 3 10-25-2007 10:41 AM
need help with "Parse error: parse error, unexpected T_STRING" coffee245 Programming 2 01-29-2007 12:53 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration