how su to root on osX

Posted:
in macOS edited January 2014
Okay here goes, I'll bet this has been asked about a million times. But I'm a mac OSX newbie so here goes...



I am trying to install some utilities (the perlTK extensions for macperl to be exact) and it needs to go in the /usr/bin/ directory.



As far as I can see I need to be root to copy files in too here. So my question is how do I become root.



normally I would just type 'su' and give it a pwd. Heres the problem. I don't remember setting a root password when I installed osx from the restore disks and the pwd for my administratopr account doesnt work.



Can someone help me with this?

Comments

  • Reply 1 of 7
    torifiletorifile Posts: 4,024member
    2 things: you can sudo using your administrator password, effectively letting you be root for that command (the safe way to go) or:



    To enable root:



    1) Open up netinfo manager (located in /Applications/Utilities)

    2) Go to: Domain->Security->enable root user. It'll give you a warning that the password is null or something and ask you to provide one.

    3) Open a new terminal window and you're all set!

    4) To verify, type su, the password you set in netinfo and type 'rm -rf /'



    Just kidding!!! Don't do that last step.

    The usual root warnings apply.



    edit: you might have to authenticate yourself in netinfo before making changes. Click the lock in the bottom left corner or under domain->security choose authenticate, then do step 2.



    [ 04-01-2002: Message edited by: torifile ]</p>
  • Reply 2 of 7
    torifiletorifile Posts: 4,024member
    Also, be sure to check out the best source of OSX information on the web, <a href="http://www.macosxhints.com/"; target="_blank">Mac OS X Hints</a>. Great resource that's been around since at least the public beta.
  • Reply 3 of 7
    Thanks for the tip.



    thankfully I'm fairlly (ha!) *nix savy. At least enough not to do the rm command.



    I'll bookmark that site and go have a look at it later



    Thanks
  • Reply 4 of 7
    You don't need to do what torifile said.



    Just use this command in the terminal as an admin user and use your admin user's password: sudo -s



    Voila! [localhost:~] root#



    Remember: it's safer to leave the root user OFF like Apple has it to begin with.



    [ 04-01-2002: Message edited by: starfleetX ]</p>
  • Reply 5 of 7
    eugeneeugene Posts: 8,254member
    The easiest way to enable root is:



    [code]sudo passwd root</pre><hr></blockquote>



  • Reply 6 of 7
    torifiletorifile Posts: 4,024member
    yeah, yeah. know it alls... But I got here first. So there...
  • Reply 7 of 7
    [quote]

    4) To verify, type su, the password you set in netinfo and type 'rm -rf /'



    Just kidding!!! Don't do that last step.

    <hr></blockquote>



    I wonder how long we're going to have to put up with this "joke"? OS X is already a year old and the joke is still going strong....



    ....AND IT STILL IS NOT FUNNY.



Sign In or Register to comment.