MacBook G4 SUDOERS file At COMMAND PROMPT - Can't Exit - Help
November 22, 2013 1:05 AM

So someone gifted me with an old MacBook G4 - and now stuck in Command Prompt.

I just tried to create a new admin - just to clean things up. I'm a complete newbie though and got stuck in Sudoers command prompt with --INSERT-- at the end and it's not letting me exit. Help??
posted by watercarrier to Computers & Internet (8 answers total)
Sounds like you ended up in vi(m) by accident. Hit esc, then type :q! (w/ the colon) and hit enter to quit without saving, which I'm guessing is what you'd want -- you don't want to unintentionally muss up a random file. That should kick you back out to the shell.
posted by un petit cadeau at 1:25 AM on November 22, 2013


OK - so I'm in localhost:/ root#
Now how do I exit the whole shebang and just make nice the way it *was* so to speak with the old admin's stuff?
posted by watercarrier at 1:38 AM on November 22, 2013


You should be fine now, as the instructions un petit cadeau gave you were intended not to save any changes. Just quit Terminal and carry on with your day if you don't want to be in the command line anymore.

p.s. You can create a new user account (admin or otherwise) using the GUI by going to System Preferences->Users & Groups and clicking the + sign below the user list (you may need to unlock the preference pane by clicking the lock at the bottom of the window and entering the admin password first). It sounds like you already know the existing admin password, but it can be reset if needed.
posted by zachlipton at 2:09 AM on November 22, 2013


You can exit the terminal shell by typing 'exit' and pressing enter by the way, or just press ctrl-d.

Then go and create a new account via the GUI in system preferences as Zach suggests :)
posted by pharm at 2:29 AM on November 22, 2013


Someone here typed *reboot* before I got a chance to see the replies. It's gone through all the dialogue boxes - everything is working - EXCEPT no access to the admin. Is it gone forever. All I wanted really was the music. So - what can be done now? Thank you!!
posted by watercarrier at 3:02 AM on November 22, 2013


Was everything re-written?
posted by watercarrier at 3:04 AM on November 22, 2013


To clarify: OS X won't let you remove the last admin account, even from the command line. If you really need admin access to the machine to get at the files, any boot disk for OS X should let you boot from the disk and change the password for the admin account. See here: http://support.apple.com/kb/ht1274
posted by Mo Nickels at 9:03 AM on November 22, 2013


Eh, I just wanted to make the Mac mine in full since receiving it pre-owned. So went to the command prompt- to give me access to everything, delete what was personal to the other person and just leave whatever wasn't. Liking the Mac though, I think it'll work till I get the hang of things, then I can set it up more to my liking. Thanks everyone.
posted by watercarrier at 7:52 AM on November 23, 2013


« Older Help Me Figure Out the Best Finanacial Strategy   |   experts on portuguese literature senior academics... Newer »
This thread is closed to new comments.