Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

PowerFullMac

macrumors 601
Original poster
As the thread says... if someone else setup your computer for you and you want to get into the root user but cant as they changed the password then this guide will tell you how. --YOU MUST BE ADMINISTRATOR OR KNOW THE PASSWORD OF SOMEONE WHO IS--

1) Open up terminal by goin to spotlight then typing Terminal then when you see it click it. If you dont have Tiger go to the Applications folder and click Utilities then Terminal.

2) Now once it has loaded type: sudo -s

3) This is where you need the Admin password, the charicors wont come up but it is owrking so type it and press enter.

4) Now it should say root insted of your username

5) Now type the following: passwd

6) It should now ask for a new password, once agein the charictors wont come up. After that press enter. It will then ask you to confirm so type it agein.

7) Now log out or use fast switching and click Login Window and if you have a list of users then click Other... (at the bottom) then type in username root and in password type what you set it as and thats it. Your in. Just be carefull as the root user can be dangorus if you dont know what your doing.
 
So, basically you've used your sudo privileges to change the root account's password. Handy in case you don't know the root password or forgot it.

FWIW sudo can be corralled to stop you from doing this, so it's not a security weakness and I think there may be easier ways to do this in single user mode...

B
 
Anyone else see the irony in wanting to be root but needing to be an admin to do so?

OP what is the point of this post? OS X ships with root disabled by default. You can use sudo and your admin password to do everything root can. Like you said about you can even use sudo -s and your admin password and this will dump you to the root account. IMHO there is no need to do this, and there is even less need to actually login as root.
 
FWIW sudo can be corralled to stop you from doing this, so it's not a security weakness and I think there may be easier ways to do this in single user mode...
B
I didnt was it was a security weakness. And i also think that its much easer this was than booting in to single user mode.
 
I think a thread-digging is in order here.... In case anyone wants to know? It's been, uh, useful for me at school..... 😉

Boot into Single User Mode by holding down Command-S at startup.

After it finishes booting (will take a minute or two) type "passwd root" at the prompt.

It'll ask you to type a new password. Do so. Press enter.

It'll ask you to type it again. Do so. Press enter.

Reboot! 😀
 
So how do you log in to root after that and how do you disable root after that (if you are not admin)?

Just asking as I want to do this on my mums computer and dont want her to kill me 😀
 
Ha ha!

So, does this prevent Cmd-S for single user mode?

My parents trust me. I'm past the Barney stage 😀

Yes, the following is for Intel Macs.

  • Blocks the ability to use the "C" key to start up from an optical disc.
  • Blocks the ability to use the "N" key to start up from a NetBoot server.
  • Blocks the ability to use the "T" key to start up in Target Disk Mode (on computers that offer this feature).
  • Blocks the ability to use the "D" key to start up from the Diagnostic volume of the Install DVD.
  • Blocks the ability to start up a system in Single-user mode by pressing the Command-S key combination during startup.
  • Blocks a reset of Parameter RAM (PRAM) by pressing the Command-Option-P-R key combination during startup.
  • Blocks the ability to start up in Verbose mode by pressing the Command-V key combination during startup.
  • Blocks the ability to start up in Safe Boot mode by pressing the Shift key during startup.
  • Requires the password to use the Startup Manager, accessed by pressing the Option key during startup (see below)

FWIW I trust my kids too, and my 5 year old wouldn't be bothered with rebooting. 😛

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.