|
|
#1 |
|
Prospect
Join Date: Jun 2005
Posts: 23
|
how to repair /etc/sudoers ?
Hi,
I work on my iMac normally with a non-admin user account. I wanted to give it some extra capabilities by editing /etc/sudoers (-r--r----- root wheel) after becoming admin (`su - admin`). I have the habit to keep a memory of important config files with old-fashioned rcs, so I did a `sudo ci -l`. This changed the rights to -rw-r----- . Now whenever I want to do anything with sudo, I get: sudo: /etc/sudoers is mode 0640, should be 0440 Segmentation fault Yeah, nice built-in Nazi security feature. Also note the graceless finishing. Admin cannot change the file permissions, and admin cannot sudo to root who could. What can I do to repair this?? Tom |
|
|
|
|
|
#2 |
|
Triple-A Player
Join Date: May 2008
Location: Down by the river
Posts: 190
|
sudo chmod 440 /etc/sudoers
|
|
|
|
|
|
#3 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,045
|
Can't fix the sudoers file using sudo. Tux: you will have to reboot into single-user mode and repair the file's permissions from there. And stop fiddling with it in the future. If you really need to edit it, use visudo - it does a syntax check before saving it so you don't lock yourself out making a typo. |
|||||||||||||||||||||||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|