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

Soulplayer

macrumors newbie
Original poster
Mar 3, 2010
12
0
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,

Sander
 

maflynn

macrumors Haswell
May 3, 2009
73,447
43,358
Why not use sudo nano /private/etc/hosts?

That way you'll not need to log in as root
 

Soulplayer

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

Thank you!
 

initialsBB

macrumors 6502a
Oct 18, 2010
688
2
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 !
 

minifridge1138

macrumors 65816
Jun 26, 2010
1,175
197
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.