PDA

View Full Version : Sudo problem :(



manaburn
19th January 2008, 04:46 PM
I have been trying to give my user profile sudo privileges by using the commandline way and using dangermouse1. Both end up giving me this error when trying to sudo:


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

so I used gedit to check line 90 and here it is


## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom

the last line is 90, can anyone spot the syntax error or is there another way to go about this?

THNX :)

Gentoo Bob
19th January 2008, 05:09 PM
first off, you should not use gedit to edit the sudo file. you use "visudo". you can take a chance on corrupting your sudo file using anythign else. or try doing an echo command into that file. from what I can tell on your line 90, nothing is wrong because its commented out so it should cause any issues. try using visudo instead. you want to uncomment the line that says # %wheel then put your user in the wheel group in the /etc/group file. that should take care of it. Hopefully you didnt corrupt your sudoers file.

manaburn
19th January 2008, 05:24 PM
Ok so I figured out how to use the visudo command and now im in the sudoers file. So what do you mean by uncomment the line? maybe you can show me what it should look like. Thnx

manaburn
19th January 2008, 06:10 PM
Got it working thnx :)

Gentoo Bob
21st January 2008, 03:58 AM
LOL there you go!

Evil_Bert
21st January 2008, 04:23 AM
first off, you should not use gedit to edit the sudo file. you use "visudo". you can take a chance on corrupting your sudo file using anythign else.
I think that's really a matter of opinion. I'm sure the programmer who wrote that advice was quite adept in using those old-style vi editors, but the modern user is more comfortable with a graphical editor like gedit, IMHO. An inexperienced user trying to use visudo can create as many problems as it solves.