Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Why do me and root have the same password? Wait. Do we?

Why do me and root have the same password? Wait. Do we?
Thread Tools
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Aug 27, 2004, 08:49 PM
 
When I log in to my box as "john", I type my password: mycatsbreathsmellslikecatfood

Now, my 'john' account is a so-called "Admin" account. The only Admin account on the computer as a matter of fact.

When I need to use sudo for any particularly dangerous command, like say, 'sudo ls -l', I have to give... a password. Hmm... Am I giving my password here or the root password?

Wait. Thinking back, when I installed Panther, I was never asked to provide a root password -- I had to come up with only one password; for the "john" user.

Is my password actually the root password as well? If not, what *is* the root password?!

Hmm... life is so much simpler with Slackware... ;^) [ducks]
     
Professional Poster
Join Date: Oct 1999
Location: Always within bluetooth range
Status: Offline
Reply With Quote
Aug 27, 2004, 09:38 PM
 
You're an admin user, not "Root" (which is disabled by default in OS X). To enable Root, you must manually go into Applications/Utilities/NetInfo Manager .... go to the "Security" menu and click "Enable Root User". You'll then be prompted to create a password. Unless you have a specific need to enable Root, its better just to leave it off. If you have to enable root for some reason ... go back and disable root when you are finished.

So ... no, your password is NOT Root's password (unless you choose to make it so)
     
johnMG  (op)
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Aug 27, 2004, 11:11 PM
 
Thanks for the reply Herschel. I'm a bit used to unix, so the idea of a disabled root user strikes me as very unnatural. :)

Interestingly enough: on my Powerbook, I've never enabled root, so there's no root password set for it. When I boot into single-user mode on the PB and run the passwd command, it just hangs (!). I guess it doesn't like having the current password being ... hmm... undefined? :)
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
Aug 27, 2004, 11:13 PM
 
That's the way sudo works - with your own password.

It's purpose is to allow non-root users to run commands as root. Otherwise, well, they'd have to have the root password.

And on OS X there is no reason to enable root. You can do everything with sudo and sudo -s.

Wade
     
johnMG  (op)
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Aug 27, 2004, 11:19 PM
 
> That's the way sudo works - with your own password.

Right. I was just confused because, after installing Panther, the only password I ever had to come up with during the install was my own. Since I figured that there *had* to be a root user, I just guessed that the one password maybe somehow went for both. [shrug]

I mean, who ever heard of a root user but no root password?! :)
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Aug 27, 2004, 11:23 PM
 
The "sudo" password is always the password for the user invoking it. Sudo then goes to a file (/etc/sudoers) and sees what the policy is for that user/group. Since there is a line in the standard sudoers file on MacOS X that says:

%admin ALL=(ALL) ALL

...sudo knows that anyone in the admin group can run any application as if they were root, but since there is nothing that says they don't have to use a password, they have to give their password.

Sudo is a very powerful admin tool when you know how to use it correctly.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 28, 2004, 07:53 AM
 
Originally posted by larkost:
Sudo is a very powerful admin tool when you know how to use it correctly.
And a very dangerous one when you don't.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:41 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2