Results 1 to 10 of 10
  1. #1

    mac57's Avatar
    Member Since
    Apr 29, 2006
    Location
    St. Somewhere
    Posts
    4,560
    Specs:
    iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM
    How To Set The Root Password on Mac OS X?
    I have just switched to Mac, from Windows and Linux. I have had my new Mac (a Power Mac G5, OS X 10.4.6) for about a week now. Today, for the first time, I tried out sudo and just su itself. Trouble in paradise...

    su prompted me for a password. At no time during the set up of this Mac was I ever asked to enter a root password - I had hoped it simply hadn't been set, and typing "su" would just log me in as root. Is there a default password that all Macs come with that I can use? Alternately, is there some way of setting the root password at this point?

    For sudo, once I get past being able to log in as root, I will need to find the Mac OS X equivalent of what in Linux would be /etc/sudoers. Where does this live on the Mac?

    Thanks!
    My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
    My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
    My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
    I was on the Mac-Forums honor roll for September 2007

  2. #2

    TBoblp's Avatar
    Member Since
    May 11, 2006
    Location
    South Florida
    Posts
    140
    Specs:
    20" Intel iMac, 15" Powerbook G4 (sold), 20GB iPod (nearing death)
    There may be a different way to do it than this, but trust me...it works. And you can look and ask around, it does work:

    Get your OSX restore/install and put it in. Click on Install Mac OS. You'll be asked to restart. Do it. You're not going to resinstall, just keep going through windows of the installer until you get to one called utilities or something. one of the choices is reset password. change the password to something you know and then quit the installer.
    Jazz is life

    "Master your instrument, master the music, and then forget all that **** and just play.
    -Charlie Parker

  3. #3

    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,584
    Specs:
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    Cool
    Your admin pass word should work with sudo. To use su you would need antohter user. As you said with root. The root user is disabled by default with OS X. You will have to enalbe root and give it a pass word to be able to su to it.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  4. #4

    mac57's Avatar
    Member Since
    Apr 29, 2006
    Location
    St. Somewhere
    Posts
    4,560
    Specs:
    iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM
    So, the root user ID doesn't exist at all? That would be consistent with what I see in the Users preference panel. This is just fine if I can set up a sudoers file somewhere, so that I don't have to go through the password challenge/response for every "sudo" based command. Is there a Mac OS X equivalent of sudoers?
    My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
    My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
    My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
    I was on the Mac-Forums honor roll for September 2007

  5. #5

    Benjamindaines's Avatar
    Member Since
    Jan 08, 2005
    Location
    A religiously oppressed state
    Posts
    2,789
    Specs:
    17" MacBook Pro
    Navigate to /Applications/Utilities and open NetInfo Manager. Select Security > Authenticate and type your administrator password (login password). Now go Security > Enable Root User, from there it will be pretty obvious. To disable the root user (suggested when you are done) open NetInfo Manager again, authenticate and then disable the root user from the Security menu.

    --Cheers

  6. #6
    JunMacTech
    Guest
    Quote Originally Posted by mac57
    So, the root user ID doesn't exist at all? That would be consistent with what I see in the Users preference panel. This is just fine if I can set up a sudoers file somewhere, so that I don't have to go through the password challenge/response for every "sudo" based command. Is there a Mac OS X equivalent of sudoers?
    Are you logged in as an administrator when you are trying to use sudo? All users with admin privs should be in the sudoers list by default. You shouldn't be prompted for a password.

  7. #7

    mac57's Avatar
    Member Since
    Apr 29, 2006
    Location
    St. Somewhere
    Posts
    4,560
    Specs:
    iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM
    Thanks all. When I am being prompted for the sudo password, I have just opened a Terminal window and typed "sudo some-command". There is only one user on this machine, and that is me. I do have admin priveledges - I am asked for the password from time to time on software installs and it works. Based on what you said, I should be in the sudoers file then?
    My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
    My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
    My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
    I was on the Mac-Forums honor roll for September 2007

  8. #8

    rman's Avatar
    Member Since
    Dec 24, 2002
    Location
    Los Angeles, California
    Posts
    12,584
    Specs:
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    Cool
    If I remember correctly, being in the sudoers file will only allow you to use the sudo command. You will always have to enter the pass word when using it.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

  9. #9

    Benjamindaines's Avatar
    Member Since
    Jan 08, 2005
    Location
    A religiously oppressed state
    Posts
    2,789
    Specs:
    17" MacBook Pro
    Quote Originally Posted by rman
    If I remember correctly, being in the sudoers file will only allow you to use the sudo command. You will always have to enter the pass word when using it.
    That is correct.

  10. #10

    baggss's Avatar
    Member Since
    Oct 10, 2004
    Location
    Margaritaville
    Posts
    10,311
    Specs:
    27" 3.4 Ghz i7 iMac-13" C2D Macbook-OSX 10.10.2 -64Gb iPad 2-64 Gb iPhone 6+-ATV 2-14Tb of Storage
    Quote Originally Posted by TBoblp
    There may be a different way to do it than this, but trust me...it works. And you can look and ask around, it does work:

    Get your OSX restore/install and put it in. Click on Install Mac OS. You'll be asked to restart. Do it. You're not going to resinstall, just keep going through windows of the installer until you get to one called utilities or something. one of the choices is reset password. change the password to something you know and then quit the installer.
    On 10.4 it's the second install screen (when booted from the DVD) and it's under utilities.

    I have the root account enabled on all the Mac in my house.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. root password
    By kjell1979 in forum OS X - Operating System
    Replies: 3
    Last Post: 07-11-2008, 01:48 PM
  2. root password
    By tobywuk in forum Switcher Hangout
    Replies: 7
    Last Post: 09-11-2007, 06:26 AM
  3. root password
    By pirho in forum OS X - Operating System
    Replies: 10
    Last Post: 04-23-2007, 11:44 PM
  4. Root Password?
    By mgmcc in forum OS X - Operating System
    Replies: 4
    Last Post: 04-05-2007, 06:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •