the file /private/etc/sudoers is a file Not to touch for unix newbies!
(Like I was)
This file is accesible by default only to the root user.
But, as we all know, Apple has CONVINIENTLY locked the root users password!
So I figured, hmm- sudo, sudoers?
And I tried
sudo chmod 777 sudoers
(because the file was locked by apple and I needed to sudo in)
Hmm. A while later I decided to sudo/chmod another file.
And I got this delightful error message on my screen
/etc/sudoers is 777. must be 0440
But now we have the catch!
I cant use SUDO anymore to CHANGE BACK THE SUDOERS FILE
So. I had just learned how to lock myself out of sudo. Permanently.
So. The only solutions (that I thought of) were
1: Reinstall osx. (not plesant)
2: 'Modify' the root user password
Now on to the root user password.
For this you will need:
1 admin account
(as in users control panel..... [not a REAL admin acct.])
Open Applications-->Utilities-->NetInfo Manager
Click the little Lock-Thingy in the bottom left corner and unlock it.
Use the netinfo directory browser to browse to the 'users' directory and choose your user (or any user to which you know the password)
select the text to the right of the 'passwd'
copy this into the same field as the root user.
Logout as in standard in OSX
and login as
login: Root
password: YourNewPassword (not the garbled stuff, the actual password)
If you have any questions, just respond And I will help you!
(Like I was)
This file is accesible by default only to the root user.
But, as we all know, Apple has CONVINIENTLY locked the root users password!
So I figured, hmm- sudo, sudoers?
And I tried
sudo chmod 777 sudoers
(because the file was locked by apple and I needed to sudo in)
Hmm. A while later I decided to sudo/chmod another file.
And I got this delightful error message on my screen
/etc/sudoers is 777. must be 0440
But now we have the catch!
I cant use SUDO anymore to CHANGE BACK THE SUDOERS FILE
So. I had just learned how to lock myself out of sudo. Permanently.
So. The only solutions (that I thought of) were
1: Reinstall osx. (not plesant)
2: 'Modify' the root user password
Now on to the root user password.
For this you will need:
1 admin account
(as in users control panel..... [not a REAL admin acct.])
Open Applications-->Utilities-->NetInfo Manager
Click the little Lock-Thingy in the bottom left corner and unlock it.
Use the netinfo directory browser to browse to the 'users' directory and choose your user (or any user to which you know the password)
select the text to the right of the 'passwd'
copy this into the same field as the root user.
Logout as in standard in OSX
and login as
login: Root
password: YourNewPassword (not the garbled stuff, the actual password)
If you have any questions, just respond And I will help you!