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.

Sorry, try again.
Sorry, try again.
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.

  • 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

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.

  • 5
    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
  • 1
    Also note this is pretty standard *nix behavior and has not much to do with Mac specifically
    – dstarh
    Apr 23 '14 at 21:13
  • @dstarh Both the practice of disabling the root account and the concept of the Administrator user accounts are unique and invented at Apple as far as I know, not at all standard/common Unix practice. Apple (and Next Computer, Inc. before it) has done many such things over the years to try to improve/secure/modernize Unix-style operating systems. Oct 26 '18 at 0:48

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?

  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .