Solved

How can I recover (or change) my root password on a MacBook

Posted on 2006-10-31
6
8,288 Views
Last Modified: 2013-11-24
I bought a MacBook for the combination of the underlying unix and the Mac Aps.

I have managed to install xcode, but that did not come with fortran or mpi, so I need to install gcc 4.1 directly (to get fortran).

I have not been able to install gcc 4.1 without a root password.  I have no idea what the root pasword is (I was never asked to choose one) and no idea how to reset it.

Please help!

Thanks,
  Ken
0
Comment
Question by:klopter
6 Comments
 
LVL 39

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 100 total points
ID: 17848813
The root password is the one that is associated with the Administrator or root account on your Mac.
When you install or upgrade applications like iTunes using software update it usually prompts you for a password .. the same one.
If you are the default user .. then your user account should have administrator privileges.
Use the same password you use to logon to your Mac or to install Software updates (there may be NO password set if you left the password field blank during setup!)
0
 
LVL 9

Assisted Solution

by:heteronymous
heteronymous earned 100 total points
ID: 17849762
If working in the command-line, you'll need to use sudo
sudo <my command>

and the password asked for will be your main account (Admin, UID 501) password.

If you need to reset the password because you've lost it, boot from the Apple install DVD and use the Reset Password utility availabled from the top menu once booted from DVD , and after selecting the "use english" initial window.
0
 
LVL 12

Assisted Solution

by:benhanson
benhanson earned 100 total points
ID: 17854923
By default in OS X, the root account is 'disabled'.  Really it is just disabled from a user perspective, since much of the system is of course running as root.  You need to 'enable' root by going to \Applications\Utilities, open NetInfo Manager.app, click on the Security menu and click "Enable Root User"
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 12

Accepted Solution

by:
dalesit earned 100 total points
ID: 17855093
Actually, you don't need to enable the root user. If you want a root shell, you can use

sudo -s

which will give you a root shell with which you can do anything you like. However, the password you put in is that of your own user. This is more secure than enabling the root user, as root is always tried in hacking attacks. Using sudo, it is not possible to login directly as root.

Cheers,

Joel
0
 
LVL 6

Assisted Solution

by:manicsquirrel
manicsquirrel earned 100 total points
ID: 17919937
If you ever need to reset root pwd because you forgot it or something, just boot the mac to the OSX install CD.  Once the installer starts, click on the Apple menu in the upper left and select "Reset Root Password"
0
 

Author Comment

by:klopter
ID: 17920965
Wow, this is amzing.  All five of these answers are relevant to me and provide me with a different piece of the puzzle.  I will stick to sudo for now (using my regular account password), but it is nice to know that I can enable root and set the password if that becomes truly neessary.

Thanks all!
  Ken
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
This video teaches viewers about errors in exception handling.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question