From: laredotornado on
Hi,

I'm using Mac 10.6.3. I'm logged in as the "davea" user who has sudo
privileges. However, I have corrupted my /etc/sudoers file and
accidentally given it 710 permissions. I'm trying to change it back
to 440, but I repeatedly get

davea-mbp2:apache2 davea$ sudo chmod 440 /etc/sudoers
sudo: /etc/sudoers is mode 0710, should be 0440
Segmentation fault

Any ideas how to restore the perms? Thanks, - Dave
From: JF Mezei on
laredotornado wrote:

> privileges. However, I have corrupted my /etc/sudoers file and
> accidentally given it 710 permissions. I'm trying to change it back
> to 440, but I repeatedly get

Here is what I have:

bash-3.2$ ls -l /etc/sudoers
-r--r----- 1 root wheel 1242 Jun 23 2009 /etc/sudoers


You could enable the root account, xterm -e login & to get a new
window and login as root, at which point, you should be able to chmod it.

To enable root at 10.6:

system->library->core services->directory utility

Click on the lock to authenticate. then select "Local". Then, in the
EDIT menu, you will have options to enable the root account and/or
chsnge its passowrd. You can disable it there once you are done.
From: laredotornado on
On May 2, 3:09 pm, JF Mezei <jfmezei.spam...(a)vaxination.ca> wrote:
> laredotornadowrote:
> > privileges.  However, I have corrupted my /etc/sudoers file and
> > accidentally given it 710 permissions.  I'm trying to change it back
> > to 440, but I repeatedly get
>
> Here is what I have:
>
> bash-3.2$ ls -l /etc/sudoers
> -r--r-----  1 root  wheel  1242 Jun 23  2009 /etc/sudoers
>
> You could enable the root account, xterm -e login &  to get a new
> window and login as root, at which point, you should be able to chmod it.
>
> To enable root at 10.6:
>
> system->library->core services->directory utility
>
> Click on the lock to authenticate. then select "Local". Then, in the
> EDIT menu, you will have options to enable the root account and/or
> chsnge its passowrd. You can disable it there once you are done.


In the second option you mention, how do I access "System" (as in
system->Library->...) ? - Dave
From: Barry Margolin on
In article
<fad896ad-af67-4839-bf37-8b1978b1071e(a)h9g2000yqm.googlegroups.com>,
laredotornado <laredotornado(a)zipmail.com> wrote:

> Hi,
>
> I'm using Mac 10.6.3. I'm logged in as the "davea" user who has sudo
> privileges. However, I have corrupted my /etc/sudoers file and
> accidentally given it 710 permissions. I'm trying to change it back
> to 440, but I repeatedly get
>
> davea-mbp2:apache2 davea$ sudo chmod 440 /etc/sudoers
> sudo: /etc/sudoers is mode 0710, should be 0440
> Segmentation fault
>
> Any ideas how to restore the perms? Thanks, - Dave

Boot into single-user mode, by pressing Cmd-S when you reboot. You have
root permissions then, so you can just use chmod.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: JF Mezei on
laredotornado wrote:

> In the second option you mention, how do I access "System" (as in
> system->Library->...) ? - Dave

In your boot drive, you should have a "System" folder.