Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I tried adding myself to the sudoers file using a tutuorial I found, now I'm getting this error when I try to run 'sudo yum': [nathan@localhost ~]$ sudo yum ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    10

    Sudoers problem


    Hi,

    I tried adding myself to the sudoers file using a tutuorial I found, now I'm getting this error when I try to run 'sudo yum':

    [nathan@localhost ~]$ sudo yum
    >>> sudoers file: syntax error, line 95 <<<
    sudo: parse error in /etc/sudoers near line 95

    How do I fix this? Did I really screw something up badly?

    -Nathan

  2. #2
    Linux User peteh's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    339
    The easiest way to fix it is to remove what you put in. Are you using
    Code:
    visudo -f /etc/sudoers
    to edit the file?
    Pete

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    What is on line 95 in the file? When you added yourself you most likely did something wrong and that is why it is complaining. Fixing line 95 will resolve this issue.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    10

    ...

    This is what happens when I run visudo command:

    [nathan@localhost ~]$ visudo -f /etc/sudoers
    bash: visudo: command not found


    I sure hope I can fix this...

    -Nathan

  5. #5
    Just Joined!
    Join Date
    Oct 2008
    Posts
    10
    How do I fix line 95?/ I really don't even know how I messed it up!

    -Nathan

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Arte you root or sudoer when you execute this command?
    If not root then try using the full path to the file:

    /usr/sbin/visudo -f /etc/sudoers

    You could always use 'locate <file/command>' to find where a program or file is located as long as you have the DB updated.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •