Step-by-step instructions to access "root"

Discussion in 'General Mac Discussion' started by kay, Mar 19, 2002.

  1. kay macrumors member

    Joined:
    Jan 26, 2002
    #1
    Could someone please provide step-by-step instructions on how to access the "root" account on Mac OS X? I've been running it as my primary operating system since 10.1 came out, and I'd like to make my default account the "root" account, or just use the root account as my own. Thanks...
     
  2. sparkleytone macrumors 68020

    sparkleytone

    Joined:
    Oct 28, 2001
    Location:
    Greensboro, NC
    #2
    why?

    if you really know what you are doing, then you would know how (or have figured it out). if you really don't, then you shouldn't be using it anyways.

    simple.
     
  3. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #3
    Just by virtue of the way you stated the question, you've put most people who know enough to give you that information into a quandry. On one hand is the desire to be helpful. On the other, you don't seem to really understand what the root account is. Besides, the one rule that gets hammered into every UNIX newbie's brain is that you never, ever, EVER use the root login as your primary account. That's why Apple hid it from you in the first place.

    So I'm not trying to be obstructionist, but I don't really want to be the one to give you enough rope to shoot yourself in the foot, as they say. There are instructions out there in plenty of places. If they're not sufficiently complete for you, then it's probably not something you should be attempting.

    Just out of curiousity, what is it you think logging in as root will do for you that you can't do already? Not to say there aren't such things, but most of the things you're likely to want to do don't require it.
     
  4. blackpeter macrumors 6502a

    Joined:
    Aug 14, 2001
    #4
    re: thanks for being helpful

    Please. Save your elitism for the country club.

    Glad to see that even PC snobbery can infect the Mac ranks.
     
  5. kay thread starter macrumors member

    Joined:
    Jan 26, 2002
    #5
    [Sparkleytone:] That's a pretty stupid answer.

    Let's say I know how to use a computer just fine, and I just haven't figured out, or tried to figure out, how to access the root account. Why wouldn't you just tell me (assuming you know, which is somewhat implied)?

    Let's say I don't have a ****ing clue about computers, and accessing the root will likely lead to my destroying my operating system. Why do you care?

    For the record, I'd say that I'm pretty well versed in computers, especially Macs.
     
  6. kay thread starter macrumors member

    Joined:
    Jan 26, 2002
    #6
    Gelfin, thanks for your response (seriously).

    You're right, I don't completely understand what the root is. I do, however, know its basic purposes, as well as what I want to do with it (say, delete some applications which have accidentily been moved elsewhere). I also know enough about how computers work that, frankly, I can take care of my own.

    So I'll ask the question again - could someone please explain to me (or direct me to a place that can tell me) how to access the root account. Trust me when I say I hold no one but myself responsible for what happens. That should've been obvious; I came here to ask, it's my computer, and I'll do what I want with it, with or without the help of this board.
     
  7. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #7
    Re: re: thanks for being helpful

    Suppose you see a post somewhere that says, "My computer is misbehaving. I think I have a virus. I need to repartition my computer to fix it. Will someone give me step-by-step instructions how to repartition my computer?"

    Are you being elitist if you inquire further? Are you doing the querant a service if you just tell him how to do what he's asking? Sure, it's not your problem if that's not REALLY what he wants to do, but I certainly wouldn't chalk that up as your good deed for the day.
     
  8. Taft macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #8
    Careful.

    I'll make a suggestion and then give you the answer. Please listen to the suggestion. I won't deny you the information you seek, but I reserve the right to laugh conceitedly and say, "I told you so" if something goes wrong.

    Suggestion: Don't log in as root. Instead use the sudo command to execute single commands as root. Or if you can't use the command line, log in as root, do your work and log back out immediately. Also, if you enable the root account, disable it when you are done.

    To open the root account, open NetInfo Manager from the Utilities folder. Under the Domain menu (I think) there is an Security section. There you must first choose the Authenticate option and then type your admin password. Then you can set the root password and enable the root account.

    Be careful!

    Matthew
     
  9. PCUser macrumors regular

    Joined:
    Mar 1, 2002
    #9
    Root is the "system admin" of a computer. The reason it's dangerous is because you can modify/destory system files and make your system stop working.

    Really, did any of you guys besides mrtrumbe know what root is and how to get to root?

    No, it's not advisable to log in as root. (I highly suggest you don't... it protects you from having your programs delete things they shouldn't) But from your responses, I don't really think you knew more then that. (added: the people responding, not Kay)

    If you are MacOS 9 user, you already are "root". "root" is the "privileged user", ie, they can view, delete, modify, move, etc, all files, folders, and programs on a system. Programs run while root can do the same. You could do that in MacOS 9. But did you? I highly doubt it. If you leave files alone when you're root, then it's not going to be "dangerous".

    Sheesh, give the guy a break.

    (BTW, I know what root is and how to get to it in Linux, but what if I didn't in MacOS X?... from your attitude, since I don't know how to get to it in MacOS X, I probably shouldn't... sounds more like you guys are covering the fact that you have no idea how to!)
     
  10. mcrain macrumors 68000

    mcrain

    Joined:
    Feb 8, 2002
    Location:
    Illinois
    #10
    Whatever you do, don't delete everything! Do not type "delete everything" or bad bad things will happen. Also, the IRS logs whenever people log in the root account, so be very careful. If your children develop an annoying laugh, it's probably because of an improper command while logged in under root, so be very aware of what you type. (HAL was in root). Wife's headache, a side-effect of the root login. So be very very careful. Do not misspell root or root will get really mad. I warned you.
     
  11. blackpeter macrumors 6502a

    Joined:
    Aug 14, 2001
    #11
    re: Gelfin

    Sorry that my post (really a reaction Sparkley) was so short winded. If I weren't so eager to avoid back-to-back posting, I would have added a clarifying statement...

    After viewing your response I wanted to say, "thank you" for showing the MacRumors community the right way to give out advice while still directing the querant to places where he/she may procure any information they might seek.

    A lot better than to simply deny a bite from the apple of knowledge under the assumption that "I know better than you..."

    Or even worse, assuming then that you've closed the discussion with a glib closing spatement like, "simple."

    Rant done...
     
  12. cleo macrumors 65816

    cleo

    Joined:
    Jan 21, 2002
    Location:
    Tampa Bay Area, FL, USA
    #12
    Kay -

    I'll just avoid the whole "whether you should use root or not" controversy and give you a bit of advice that stumped me for a while. After you've enabled root using the NetInfo command, you have to click the "Show Other User" tick in the Login pref pane. This will give you the actual boxes in which you type "root" and your password.

    Good luck!
    Cleo
     
  13. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #13
    Yeah, I know how, but I had a meeting at work. It's awfully rude of them to keep interrupting my MacRumors posting with this "work" stuff, but what's a guy to do?

    If you're comfortable administrating Linux, then you surely would have the necessary metaskills in UNIX to find your way around in Darwin, at least enough to have an idea where to look and what to ask.

    Look, the fundamental issue here is that familiarity with modern user-friendly operating systems doesn't really lend much to a person's first forays into a UNIX environment. When people start asking questions, you find it's difficult not to be obscure in your answers, because the operating system and most of the common UNIX utilities were designed by people who, by and large, enjoy obscurity. For most of the history of computing, designing intuitive interfaces was considered a waste of time, both real time and system processing time, and UNIX is rooted in that tradition. I've often said that Mac OS X is like a dream OS for me, because I've got the power and direct control of a UNIX environment with a GUI that doesn't suck (unfortunately, I very nearly detest X11), so I can take off my hacker hat and put on my user hat when I just need to get regular stuff done.

    Personally, I'm all in favor of spreading knowledge, but I don't really think someone's first experiences in UNIX should be at a '#' prompt. If you want to go in that direction, my recommendation is to pick up one of the dozens of beginner UNIX references out there. The canonical text is A Practical Guide to the UNIX System by Mark G. Sobell, though I don't remember it being so expensive when I got my first copy.

    If all you want to do is get rid of some files that won't empty out of the trashcan, the way to do that is to open a Terminal window, type 'cd .Trash' (".Trash" is the directory that corresponds to your desktop trashcan). Use 'ls' to list the contents of the directory if you need to, but it should be identical to what you see in your trashcan. Type 'sudo rm -f <filename>' to get rid of a file. If it's a directory (or a bundle like a .app, which is really a directory anyway) that won't go away, use '-rf' instead of just '-f' ("rm" means "remove." 'r' and 'f' are option flags. 'r' is for "recursive," which means it will delete all the files in a directory and any subdirectories. 'f' is for "force," which will make rm ignore some typical non-fatal reasons rm might fail). Of course, be very careful what you delete. You will be asked for your password, and after you provide it, the file will be blown away (using root permissions).
     
  14. sparkleytone macrumors 68020

    sparkleytone

    Joined:
    Oct 28, 2001
    Location:
    Greensboro, NC
    #14
    Welcome to UNIX, your Mac knowledge is pretty much useless. Sorry to burst your bubble.

    Welcome to the UNIX community, where we make sure you know what you are doing before we tell you how to enable the most dangerous user account in UNIX.

    The reason I "care" is somewhat selfish and can be echoed by alot of knowledgeable people. I really am just trying to avoid further threads by you or someone else with the "PLEASE HELP ME" or "ITS BROKEN" subjects. If you can't appreciate that, well then I guess you really SHOULDNT be logging in as root.
     
  15. me hate windows macrumors 6502

    me hate windows

    Joined:
    Jan 18, 2002
    #15
    You are mean man. It was just a question. With the time you spen writing that post, you could have answered his/her question. Mean, mean, mean, what is this site coming to?:( Tisk, tisk, tisk:p
     
  16. krossfyter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #16
    man...didnt realize such a question would create such controversy.

    flipin unbelievable.
     
  17. PCUser macrumors regular

    Joined:
    Mar 1, 2002
    #17
    Gelfin, I did not mean to step on your toes. And true, I probably would have no trouble figuring out my way through Darwin.

    I suggest those who wish to learn about UNIX and root get a cheap test box, install a UNIX clone, and abuse it. There is no better way to find out why NOT to log in as root then to do so. Because when you are a beginning user, no matter how much an experienced user warns you against what you're trying to do, you'll want to do it anyway.
     
  18. blackpeter macrumors 6502a

    Joined:
    Aug 14, 2001
    #18
    I couldn't agree more... anyone who's self-taught in anything understands this simple concept -

    "Good judgement comes from experience.
    Experience comes from bad judgement."
     
  19. Taft macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #19
    Bad stuff can happen.

    I once set the permissions of my whole linux drive to 755. That was not good. Stuff like that has a tendency to happen when using root.

    Trust me, you'll never do anything wrong until it is important not to.

    Pretty optimistic, huh?

    Matthew
     
  20. sparkleytone macrumors 68020

    sparkleytone

    Joined:
    Oct 28, 2001
    Location:
    Greensboro, NC
    #20
    LOLOLOL!!! trumbe thats classic.

    and yes, bad judgement leads to good experience, but MY experience is when people use bad judgement based on their asking for help, when they mess up with theirnew knowledge, they come running asking for a fix, not doing it themselves.

    last week i ended up having to reinstall OS X due to my messing with the extensions folder. i didnt ask how to enable anything and i didnt ask what things meant. i also did not come running when it wasnt working right.

    i think mac_user (aztec) would be able to understand my point of view now after his disaster with a pre-release update build of OS X.
     
  21. kay thread starter macrumors member

    Joined:
    Jan 26, 2002
    #21
    You're really pretty dim, aren't you? I said "especially Macs." That doesn't mean I don't know Mac OS X is UNIX. That doesn't mean I don't know anything about Mac OS X in general. And it definitely doesn't mean that, given a little help, I can't figure out how to use it.

    The reason I asked the question in the first place is because I had read earlier (IN A POST ON THIS VERY BOARD) that the way to set the root password was to insert the install disk and do it from there somehow. Since this made ABSOLUTLY no sense to me, I decided to ask. The misconception is that because I've asked a question about OS X that goes beyond the dock, I don't really know what's going on with the system. And that is a misconception.

    Don't be so quick to judge people. The fact of the matter is, I don't know you or your abilities, nor you me. If someone asked me how to access the root, I'd tell them how, and then tell them to be careful and give the guidance that many other people have in this thread. I wouldn't say anything like what you said, and have said.

    "Welcome to the UNIX community." What are you, the spokesman? Go feel powerful using your Terminal.
     
  22. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #22
    Re: Bad stuff can happen.

    Heh. A friend of mine (really, a friend, though I'm not sure I'd own up to it if it was me) found out the hard way that on some systems if you do 'rm -rf .*' it counts '..', and as a result will recurse UPWARDS.

    He wondered why it was taking so long. :)
     
  23. Gelfin macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    Denver, CO
    #23
    Not a problem.

    Agreed. Just not on a system you expect to be using productively ten minutes from now. ;)
     
  24. sparkleytone macrumors 68020

    sparkleytone

    Joined:
    Oct 28, 2001
    Location:
    Greensboro, NC
    #24
    alright then for the last time. i never implied anyone was stupid, or that their knowledge was somehow of less quality than mine. however i di and still do question your reasons for using the root account. this is something that i learned long ago on my linux boxes can be extremely dangerous.

    now lets consider my point of view.

    1) You come on to a Mac forum asking how to enable the UNIX superuser, when a great many Mac users have no idea the implications of this just by default of nonexposure.
    2) You state that you want the default user to be the root account, a big nono in unix. i dont even login textually to my linux box as root. most people will tell you that it is much smarter to login and "su" to the root account in its own terminal, or to just sudo.
    3) Not only do you (see #1), but you post it in the GENERAL DISCUSSION forum and not the Help/Questions forum.
    4) You then consider my caution in helping you screw your system as a personal attack and others as "elitism".
    5) You then back yourself up stating familiarity with the UNIX root account, yet dont seem to know how to issue a simple "sudo passwd root" command.

    i believe i have every right to question your motive for enabling the root account.

    When it comes to UNIX problems, you don't hit forums. Its just a bad practice relying on an arbitrary person to give you his/her personal advice. Most people either pray to www.google.com or hit IRC.
     
  25. Choppaface macrumors 65816

    Joined:
    Jan 22, 2002
    Location:
    SFBA
    #25
    :LOL :D :D :D
     

Share This Page