0

Possible Duplicate:
How to modify a invalid /etc/sudoers file? It throws out anderror and not allowing me to edit again

Hi guys I have meerkat and I must have messed sudoers. This is my situation now.

ubuntu:/etc$ ifconfig Command 'ifconfig' is available in
'/sbin/ifconfig' The command could not be located because '/sbin' is
not included in the PATH environment variable. This is most likely
caused by the lack of administrative privileges associated with your
user account. ifconfig: command not found @ubuntu:/etc$ ^C
@ubuntu:/etc$ htop @ubuntu:/etc$ ls -l /etc/environment
-rw-r--r-- 1 root root 79 Feb 15 09:54 /etc/environment @ubuntu:/etc$ cd /etc/environment
-bash: cd: /etc/environment: Not a directory @ubuntu:/etc$ sudo nano /etc/environment
>>> /etc/sudoers: syntax error near line 17 <<< sudo: parse error in /etc/sudoers near line 17 sudo: no valid sudoers sources found,
quitting

What would you recommend?

1 Answers1

0

In this case a format seems like an aggressive solution to me.

I would try to fix the sudoers file (I guess you edited it by hand? You probably wanted to give a user "admin rights"?) and then add /sbin in to the PATH.

You may also want to add your user to the adim group and uncomment the line in the sudoers file that gives the members of the admin group root privileges.