How to Reset Terminal Privileges

Rangdrol

Registered
I am running Mac Mini (late 2010) and 10.6.8. I started having problems with Time Machine, noting it wasn't copying correctly. After trying to repair it, my Finder seemed to crash. That had never happened, but I found a fix, punching text into Terminal, which brought all my icons back to my desktop. When I closed, and rebooted, I wasn't able to log back into my computer, & have not since.

I of course tried PRam settings, all the startup key combinations, unplugging backup external drives, unplugging plugs, etc., and of course rebooting with the Install DVD, but nothing works. I cleaned the DVDs, etc. I even did at least ten more more fsck -fy and AppleJack AUTO restart/shutdown, etc.

I even tried Terminal commands like shutdown -h now, etc. and many others, trying to clear the Launch Services plist, etc., which it, is said, is known to cause the blue screen. While Target Mode for Firewire works, I dont have a Firewire 800 cable, and my old computer is a G4 so the Target Mode won't help me. Ive done the Command D, for Hardware Test, command, the Verbose command, Option, Option N, holding the Shift key for Safe boot, etc, and lots more. Terminal seems to be the only way to get in

Now, months ago I went to the Genius store and told them I wasn't able to copy DVDS and they told me that my optical disk was dead. I assumed that since I had been able to use my install disks in the past it was fine, but if my optical drive (they didnt even check, though, just wanted me to buy a new one) is dead, is this why I cannot reboot using the original 10.6.5. install DVDs?

I also noted today that instead of the usual $ prompt, I now have a :root# prompt, and it seems that this means I am now using root privileges, which I am told is not a good idea. Does anyone know how I can go back to using regular, safer privileges when working in Terminal? Sorry but Im new to this and to Terminal, so I dont want to wipe out anything.

If anyone knows how I can restart my Mac Mini with some magic code in Terminal please let me know.

Oh, here are some commands I have entered. This was from info on another forum, it was suggested that this was the way one could rid the system of Launch Services problems.

rm -i ~/Library/Preferences/com.apple.LaunchServices.plist
rm -i ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents
rm -i /Library/Caches/com.apple.LaunchServices*
 
Did you ever replace your bad DVD drive?
Have you tried booting to your installer DVD from an external optical drive?
 
Hi DeltaMac. Sorry but because of illness I dont check email everyday.

NO, i never did replace because I cant afford to now. But it seems, maybe that I have to, and that that would enable me to log into my computer maybe?

I have a friend who is supposed to come over with his external drive, which has the same system I do, Snow Leopard, but he keeps cancelling out on me.

Next month I will have some money and will bring my computer into an authorized Mac repair shop and I know I can trust them to tell me what the problem is. Many thanks for your kind help.
 
Last edited:
That had never happened, but I found a fix, punching text into Terminal, which brought all my icons back to my desktop.

It would be helpful if you could say what it was you typed into the terminal.

It sounds like you are still able to use terminal as root so maybe try running
Code:
 diskutil repairPermissions /
(I'm a windows guy and not very strong at mac, so i would verify if that's a good idea before you actually do it)

You also mentioned you would like to reboot using terminal.. what you are looking for should be
Code:
sudo shutdown -r now

also to verify you actually have root permissions type this in terminal
Code:
whoami
 
Thanks for the info.

I didnt include the command because it didn't fix my problem of being able to get back onto my computer. But, for those of you, if you lose your Finder.app, it crashes, and all icons disappear from your desktop, the command to fix that is below.

That said, it was after applying that that I couldnt get back onto my computer! I rebooted and it has been stuck in blue screen mode ever since!

I think that the Time Machine app is also a problem.

Even though all icons reappeared, I don't know if that REALLY fixed my Finder.app issue, and I THINK that the computer is trying to boot up, and that the Finder.app is trying to load but is not able to, and then Im stuck at the blue screen hang. I cant even reinstall with my original 10.6 Snow Leopard DVD! And that is just plain weird! However, even though this is just 1 and a half years old Mac Mini, my optical drive never worked, and I was told that just a couple months ago when I had been unable to burn DVDs, (the one reason I chose Mac Mini) and when I made it to the Genius Store, they told me, without even looking at it, that yes, my optical drive was dead, meaning they must have had problems, lots of problems with it. And though i had been in there with other blue screen, and grey screen issues (when typing lots of info!!) they wouldnt replace it! So...

Anyway, here is the command which restores crashed Finder.app icons. I would suggest that if this happens to you, you do not reboot, but instead, run disk utilities, to make sure that the finder.app is fine.
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder & disown

Also, yes, whoami tells me that I am :/ root#

I am also able to restart with "shutdown -r now" or "shutdown -h now" but those are of little help.

I also did remove certain launchservices caches, upon instruction I read, thinking that I could get those LaunchServices to reboot my system. However, I think that in doing so, deleting those plist features MAY have given me even more of a problem, and that the system, which would generally just re-create a new .plist, now cannot do so, and as such, MAYBE Finder.app cannot start because it cannot create a plist.

Here are the commands I punched in to try to clear the nasty apple finder.plist files:

rm /Users/shortname/Library/Preferences/com.apple.finder.plist
rm /Users/shortname/Library/Preferences/com.apple.sidebarlists.plist
sudo rm -Rf ~/.Trash/*


I realized that I didn't have to enter sudo when emptying the trash, so maybe I should do that again, very carefully because if I added just one extra space between the "." and the word Trash, I read that I could have deleted everything on my computer...which seems strange because it is only Trash that I am trying to empty.

In any case, be VERY CAREFUL when using the remove "rm" with "-rf" command.
However, I'm not sure what my "shortname" is on my other computer, so this may NOT have worked.

I also tried removing these in order to clear up LaunchServices.plist files.

rm -i ~/Library/Preferences/com.apple.LaunchServices.plist
rm -i ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents
rm -i /Library/Caches/com.apple.LaunchServices*


However, I ran your diskutil repairPermissions / (Is the space before forward slash needed or an error?) I ran it as is, with space, and I got this message:

Unable to run because unable to use the DiskManagement framework. Common reasons include, but are not limited to, the DiskArbitration framework being unavailable due to being booted in single-user mode.

That is sort of funny because it seems this feature should be used in Single-User Mode. I mean that is the only way I can access Terminal, is via Single-User Mode??

In any case, Id like to leave this thread open. Maybe someone else has some answers or suggestions. I appreciate your help.

Also, since my knowledge of UNIX is very limited, is there a command that I can run to re-create a finder.

Again, I really appreciate your help. Im too poor to go out and spend another $300 to have the Genius Bar examine my computer...
 
So i ran a quick google search on the error you provided to me (the space before the / was intentional) and came across a tool that looks like it's meant for exactly your situation.

http://download.cnet.com/AppleJack/3000-2094_4-40293.html?tag=mncol;1

I've never used it before so i can't say much more than it's provided by Cnet (which is usually a good sign) and that it looks like it will help you out.

also i noticed your whoami command returned something *slightly* disconcerting.

the output should look like this
Code:
LOGDT00002:~ root# whoami
root

if the second line is returning you ":/ root#" there may be a problem there, but again i'm not used to mac so that may be normal. Just something i wouldn't expect with linux.


------------------------------
So the reason that rm -rf /.Trash/ is dangerous is because the "/" symbol is the name of your root directory. if you type in ls / it will show you all of the files/directories in the root of your hard-drive.

if you had accidentally typed in "rm -rf / .Trash/" rm would have said "Okay I'll delete everything in / and not ask you if you are sure". It's especially dangerous to use rm -rf with root or sudo. One key-fliched enter button and you have alot of headache ahead of you.

If you ever unsure about a command you are about to type type the word "man" infront of it. man rm and man ls are two good places to start. Press the "Q" key to get out of the man pages (esc and ctrl+c won't exit man)

----------------------------------------

Okay now for my ultimate advice:

It will be alot easier and much less learning curve to just re-install the OS cleanly. My advice would be to redouble your efforts to borrow an external CD-drive. Any manufacturer should work, it doesn't necessarily have to be apple (*I think*.. the BIOS shouldn't be able to tell the difference) and re-install your operating system.

You won't need to take it to the genius bar... you can do this.. just tough it out a bit longer. As long as you don't give up and are willing to learn you will get a working computer (and maybe find out that your drive was just corrupted drivers all along and not really dead)
 
Back
Top