Terminal - Su/Root

Discussion in 'Mac Pro' started by Soulplayer, Jun 22, 2011.

  1. Soulplayer macrumors newbie

    Mar 3, 2010
    Hellow everyone,

    I keep coming back to the same problems and only a format fixes this problem:

    If I try to use terminal and a command let's say:
    nano /private/etc/hosts

    edit the file and then try to save it, it gives an error.

    so I try to login as root and using the only password my system uses (only one user, marked as administrator) and it keeps denying that password. It also doesn't work with the command su root.

    What am I doing wrong? Is there a different login for the root?

    Using: Mac Pro 2008 - OS X 10.6.7

    Thank you,

  2. maflynn Moderator


    Staff Member

    May 3, 2009
    Why not use sudo nano /private/etc/hosts?

    That way you'll not need to log in as root
  3. Soulplayer thread starter macrumors newbie

    Mar 3, 2010
    you are a life saver :D. I've googled for an hour and you just gave me the answer.

    Thank you!
  4. fabriciom macrumors 6502


    Feb 17, 2008
    Madrid, España
  5. initialsBB macrumors 6502a

    Oct 18, 2010
    Wirelessly posted (iPhone: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5)

    Of course, but you have to promise to be careful with the sudo !
  6. minifridge1138 macrumors 6502a

    Jun 26, 2010
    It was failing because the user 'root' is not enabled by default in OS X.

    Any account that is an administrator is on the sudo list, though.

Share This Page