You are not logged in.

#1 2008-03-20 10:44:28

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Problem with sudo [SOLVED]

I added line to /etc/sudoers but now, when I try to use sudo i get 

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

And if I try to uso visudo to fix the problem I get the same response...
How can I fix this(root user has been disabled from 6 months)???


Tnks

Last edited by The_ouroboros (2008-03-20 14:41:40)


Gnu/Linux User on Arch(x86_64)

Offline

#2 2008-03-20 10:49:43

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Problem with sudo [SOLVED]

Could you paste line 36 of /etc/sudoers?


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#3 2008-03-20 10:50:03

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

dyscoria wrote:

Could you paste line 36 of /etc/sudoers?

there lies the problem...I can't get to the file....
If I try by normal user I get nothing...by sudo I get the message...by root I can't(it's disabled and I need sudo to set it up)

Last edited by The_ouroboros (2008-03-20 10:54:38)


Gnu/Linux User on Arch(x86_64)

Offline

#4 2008-03-20 10:58:12

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Problem with sudo [SOLVED]

You could try using the Arch install CD and "arch root=/dev/sda[x]" into your system. Then you'll be able to edit the file. I would imagine it's missing an apostrophe or something like that.

Take note of it and post the line up if it doesn't appear to be wrong.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#5 2008-03-20 10:59:18

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

it's seems that the file emptied itself... it contains nothing... but at the same time at line 36 I get an error... the take me into a unending loop I can't break... :S

News:
I'm torrenting the cd and about to try your way(I thought about it the 5 sec before you posted it smile )

Last edited by The_ouroboros (2008-03-20 11:00:36)


Gnu/Linux User on Arch(x86_64)

Offline

#6 2008-03-20 11:02:32

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Problem with sudo [SOLVED]

The_ouroboros wrote:

it's seems that the file emptied itself... it contains nothing... but at the same time at line 36 I get an error... the take me into a unending loop I can't break... :S

That's probably because you're not looking at the right file. I thought you couldn't see what was in the file anyways as you didn't have a root account? What command are you using to edit?


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#7 2008-03-20 13:32:54

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

I'm using visudo


Gnu/Linux User on Arch(x86_64)

Offline

#8 2008-03-20 13:45:09

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

the cd trick doesn't work..... I don't know how to fix this....
I, therefore,  can't do administration task..

Help!

Last edited by The_ouroboros (2008-03-20 13:52:53)


Gnu/Linux User on Arch(x86_64)

Offline

#9 2008-03-20 13:53:24

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Problem with sudo [SOLVED]

You can view the sudoers file manually by listing /etc/sudoers file -- that should let you see what's wrong with line 36.  You shouldn't edit the file with a regular file editor though, at least in theory.  Worse comes to worst you can always reinstall sudo using pacman and then copy the /etc/sudoers.pacnew file over /etc/sudoers to get back to the initial configuration.

Offline

#10 2008-03-20 14:13:42

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

fwojciec wrote:

You can view the sudoers file manually by listing /etc/sudoers file -- that should let you see what's wrong with line 36.  You shouldn't edit the file with a regular file editor though, at least in theory.  Worse comes to worst you can always reinstall sudo using pacman and then copy the /etc/sudoers.pacnew file over /etc/sudoers to get back to the initial configuration.

I cant open the file with visudo coz I don't have the permission and can't use pacman/yaourt for the problem in sudoers....

pacman -U sudo
error: you cannot perform this operation unless you are root.
visudo
visudo: /etc/sudoers: Permission denied
yaourt -R sudo
>>> sudoers file: syntax error, line 36 <<<
sudo: parse error in /etc/sudoers near line 36
You're not allowed to launch /usr/bin/pacman-color with sudo
Please enter root password
Password:

(root is disabled)

Last edited by The_ouroboros (2008-03-20 14:15:30)


Gnu/Linux User on Arch(x86_64)

Offline

#11 2008-03-20 14:16:52

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

ouroboros@zeusos:~$ ls /etc/sudoers
-r--r----- 1 root root 893 2008-03-20 10:12 /etc/sudoers
ouroboros@zeusos:~$ cat /etc/sudoers
cat: /etc/sudoers: Permission denied
ouroboros@zeusos:~$

Gnu/Linux User on Arch(x86_64)

Offline

#12 2008-03-20 14:21:29

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Problem with sudo [SOLVED]

No, you'd have to do this doing the CD method, as you'll have root access through the CD. I neither have tried the CD method, nor have sudo installed so I can't help you further. The CD method IS the method to pursue though, IIRC.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#13 2008-03-20 14:24:58

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Problem with sudo [SOLVED]

In this case you will have to boot with a live cd of some sort, mount your arch partition and edit the file manually that way (root permissions are not going to be a problem because you're using the live cd).  You might also want to download the source sudo tarball ftp://ftp.sudo.ws/pub/sudo/sudo-1.6.9p14.tar.gz and extract it manually to get the default sudoers file.  That way, in case there is something seriously wrong with the current file, you will be able to replace it manually using the live cd.

EDIT: I know that someone had mentioned using a cd already, but that suggestion was to boot your current arch system using the kernel from the cd -- what you need to do is load a system completely from a cd (you don't have to use arch cd, although you can), and then mount the partition that contains the broken file, and so on...

Last edited by fwojciec (2008-03-20 14:26:43)

Offline

#14 2008-03-20 14:25:19

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

I tried....I cant find the sudoers with the cd...


Gnu/Linux User on Arch(x86_64)

Offline

#15 2008-03-20 14:30:55

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Problem with sudo [SOLVED]

The_ouroboros wrote:

I tried....I cant find the sudoers with the cd...

There is no other way than using a live cd in your situation, at least nothing easy that I can think of.  My guess is that you didn't find the file because you did something wrong -- there is no magic to it, the file has to be there physically because it's returning errors when you try to issue the sudo command.  If it's really, really not there (which I find hard to believe, frankly), you can copy the sudoers file from the sudo source tarball to the /etc directory of your Arch partition manually (you'll still need to use live cd for that, because you'd need root permissions to be able to do it from within your Arch system).

Offline

#16 2008-03-20 14:41:27

The_ouroboros
Member
From: Pavia, Italy
Registered: 2007-05-28
Posts: 140

Re: Problem with sudo [SOLVED]

solved.... with a strange workaround but solved...
Thanks you all 4 the support!


Gnu/Linux User on Arch(x86_64)

Offline

#17 2008-03-20 23:00:50

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: Problem with sudo [SOLVED]

It would have been nice if you wrote how you solved the problem: this way it will be a reference for future users with the same issue.

futureguy "Cool, this guy had my same problem, let's see how he solved it!"
you "Nevermind, I solved it!"
futureguy "Damn!"


Even if this was a trivial problem, you can't really say.

Offline

#18 2009-04-08 22:30:08

df3n5
Member
Registered: 2009-04-08
Posts: 25

Re: Problem with sudo [SOLVED]

Hi,

I had a similar problem and what I did was :
1) Booted from the live CD
2) Mounted the partition with Arch installed
3) Edited /etc/sudoers and returned to initial state.
4) Rebooted and everything was grand. smile

I'll be using "visudo" in future...

Offline

Board footer

Powered by FluxBB