terminal sudo or su asks for password in Mountain Lion OS X
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.
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.