Hi - well I guess it looks like I don't know it all after all...
I appear to have a small problem with sudo. Being somewhat inexperienced with it and having never really used it in the past, I opted to edit my sudo file with nano (which is a small pico like text editor). I need to do this as a few of my programs refuse to install in root mode as they say it is unsafe - and they express a preference for sudo. Of course to use sudo I need to include myself on the /etc/sudoers list.
Well anyway this seems to have been a big mistake - as it wasn't until afterwards that I learned that the only permissable way to edit the sudoers file is to run the "visudo" command as root.
The problem now is that whenever I try to run the sudo command I always get an error saying :
Code:
raid517@box1:~$ sudo
>>> sudoers file: syntax error, line 20 <<<
sudo: parse error in /etc/sudoers near line 20
raid517@box1:~$
I have no clue what this is saying - except that maybe it didn't like the text editor I used.
My sodoers file currently looks like this:
Code:
# sudoers file.
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
# KNOPPIX WARNING: This allows the unprivileged knoppix user to start commands as root
# KNOPPIX WARNING: This is totally insecure and (almost) makes knoppix a second root account.
# KNOPPIX WARNING: Never allow external access to the #knoppix user!!!
knoppix ALL=NOPASSWD: ALL
mythtv ALL=NOPASSWD:/sbin/halt,/sbin/reboot,/bin/mount,/bin/umount,/usr/bin/mplayer,/usr/local/bin/mythbackup,/usr/local/bin/mythrestore.
The question is, what's going on and how do I fix it? I've tried reading the manual for visudo, but unfortunately it wasn't very helpful. I am still no clearer after reading it how exactly to use it to edit /etc/sudoers - or even specifically what I should write. Currently it doesn't appear to respond to any key presses at all.
As I said, all I want to do is to add myself (raid517) to the sudoers list and allow myself as many privlidges as possible without putting security at risk. Specifically in this regard I would like to give myself authority to mount and unmount files/iso's as a sudoer.
Any input anyone can offer will be very much appreciated.
GJ