LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
/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
 
Old 11-02-2008, 06:11 AM   #2
eth1
Member
 
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

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

Original Poster
Rep: Reputation: 0
Thanks for the reply


Quote:
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

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

very wel laid out, very informative

Alf
 
  


Reply

Tags
error, parse, sudoers



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 04:07 PM
What's the meaning of "PHP Parse error: parse error, unexpected $ in..." frandalla Programming 23 03-04-2009 12:34 PM
Parse error: parse error, unexpected '}' in /home/content jouvert Linux - Newbie 3 05-17-2008 06:55 PM
Parse error: parse error, unexpected $ in /home/content/d/o/m/domain/html/addpuppy2.p Scooby-Doo Programming 3 10-25-2007 09:41 AM
need help with "Parse error: parse error, unexpected T_STRING" coffee245 Programming 2 01-29-2007 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:25 PM.

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