Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I don't know the root password on my system and I'm trying to start Apache.

$ sudo apachectl start

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Sorry, try again.
sudo: 3 incorrect password attempts

------- or -----------

$ sudo su apachectl start

(same results)

My user account is an admin account. This is a refurbished MacBook Pro - new to me.

share|improve this question
1  
Just wanted to add something here, it's: apachectl start, not apachect1 start, notiche the L instead of a 1. –  Greduan Oct 14 '12 at 22:41

2 Answers 2

You should always know the root pw of your machine. If not, you can reset it with the installation disks.

But what am I confused about is if you can use your admin user ID and password to override it?

share|improve this answer
2  
The root account is disabled on OS X by default. Sudo allows a user to run commands and make system wide changes as the root user when necessary, rather than being the root user all the time. Sudo is used to allow more control over who has root privileges on a system by assigning certain users administrative rights and not sharing a common 'root password'. –  macaco Oct 14 '12 at 22:50
    
The question said sudo or su, su requires this password. –  Josiah Oct 15 '12 at 14:57

This is standard behaviour for a Mac, even if the user is in the Administrators group. The password is that of your user account, not the root account (which is typically disabled by default). OS X asks for your password in a number of situations, not just when using sudo.

If you've forgotten your user account password, you can reset it following Apple's instructions.

share|improve this answer
4  
This is the correct answer, but also something to note: If you have no password set you can't sudo - you need to set a password. support.apple.com/kb/HT4103 –  Alex Oct 15 '12 at 2:41
    
Also note this is pretty standard *nix behavior and has not much to do with Mac specifically –  dstarh Apr 23 at 21:13

protected by Community Apr 24 at 23:52

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.