This site is compiled and updated (31 July 04) by dirtymouse, the author of 'Fix a troubled Mac'
and Macintosh Consultant for Silverdata (Realware) in Sydney Australia.




Mac Troubleshooting Menu

Use this menu to access useful Macintosh troubleshooting sites, Apple Software Updates
and latest Macintosh related information, Manuals and Tech Notes.

Fix a troubled Mac Reference Guides

Emgergency troubleshooting in Mac OS X command line

WARNING: this site assumes you have a little bit of knowledge about how to get about in the command line, you should at least be familiar with commands like cd, rm, mv, cp, ls before just banging around your Mac willy nilly. You need to understand the difference between cd and cd /, understand the principle differences between root and home. Also know the importance of typing commands correctly and pay particular attention to spaces as they can mean the difference between delete this or delete everything:

Troublesome Hardware Problems

You can try resetting the NVRAM from within Open Firmware.

Resetting the NVRAM

On startup: Command-option-o-f
(to get into open firmware at Boot time)

Type each of these commands (bold text), followed by pressing the Enter Key at the end of each line break

reset-nvram

reset-all

your mac will reboot

back to index





Flashing Startup disk? - Rebless the System

When this happens, it can be very freaky. If you have a valid System installed but your Mac does not 'see' it, or has lost the link to where the boot info is located, then you will need to re-bless the system on your intended startup disk

There are open firmware commands for this, but they vary. More info soon.

You will need to boot off emergency CD-ROM or the Mac OS X Installer CD or Firewire Hard drive and use Single Usermode as follows:

On startup: Command-S Single User Mode

Type each of these commands (bold text), followed by pressing the Enter Key at the end of each line break

to enable read/write access:

/sbin/mount -uw

please note, the next command does not contain line breaks:

sudo /usr/sbin/bless -folder /Volumes/'YOURDRIVENAME'/System/Library/CoreServices -bootinfo /usr/standalone/ppc/bootx.bootinfo -label "'YOURDRIVENAME'" -save9 -verbose

Note: Substitute YOURDRIVENAME for your actual drive name!
You will get a lot of feedback detailing what was done. After which you can

shutdown -r now

back to index





login screen won't accept my password

If you cannot get to the login prompt, or your login window appears but shows no username, it is possible your NetInfo directory has been corrupted.

You can try booting off the OS X installer CD and from within the installer > file menu > reset password you can select the user with a failed login password and reset it.

If this doesn't work or you do not have the OS X Installer CD, you can try this:

On startup: Command-S Single User Mode

Type each of these commands (bold text), followed by pressing the Enter Key at the end of each line break

fsck -y

mount -uw /

cd /var/db/

rm .AppleSetupDone

cd netinfo

mv local.nidb local.nidb.corrupt

reboot

This should enable you to recreate a new user using the AppleSetup Program as if you are starting up for the first time.

back to index





Secure Copy via SSH

You can copy to any OS X Macintosh (or UNIX computer) across the Internet or Local Network without having to enable sometimes painfully slow to transfer file services like Appleshare or SMB or insecure services like FTP. You can do this quickly and securely using Secure Shell SSH.

You need to have SSH Remote Login enabled on the DESTINATION Mac you intend to transfer files to or from. You can turn this on in the System Preferences Pane called Sharing. You also need to have an SSH active account on the DESTINATION mac and you need to ensure that any DESTINATION routers, firewalls or other TCP port filtering programs are configured to enable inbound traffic on TCP Port 22 to the relevant Macintosh IP address. (It is preferable to have a fixed IP address for both Router &/or standalone Mac)

Type each of these commands (bold text), followed by pressing the Enter Key at the end of each line break

In Terminal:

scp -rpC /PATH/FROM/SOURCE/FILENAME USERNAME@IPADDRESS:/PATH/TO/DESTINATION/

the above command, will PUT via secure copy (a single file) from the SOURCE to the DESTINATION. Substitute the relevant path names, username and ip address. Also, note the space between the SOURCE and DESTINATION.

After a few seconds, your will be prompted for your SSH login password

After which, the transfer should start, with an ascii status bar indicator like % |************** time estimate and status.

When finished, your percentage should be 100%. If there is interruption to the transfer, you will get a STALLED alert. If it does not exceed the timeout, your transfer should resume.

Alternately, you can transfer a whole folder (-r will recursively copy the folders contents)

scp -rpC /PATH/SOURCE/FOLDER/ USERNAME@IPADDRESS:/PATH/DESTINATION/

If you want to GET a file from the Mac instead (assuming it is setup as above):

scp USERNAME@IPADDRESS:/PATH/SOURCE/FILENAME /PATH/TO/DESTINATION/

Test it beforehand, you may have only access to a home directory on the DESTINATION computer;

scp USERNAME@IPADDRESS:~/FILENAME /WHATEVERLOCATION/

Note: In each example, there is always a space between the SOURCE and the DESTINATION

back to index









Fixing File Sharing Permissions

Sometimes Workgroup Manager in OSX Server or the Get Info Window in the Finder will not fix folder access & file permissions. You need to manually do these in the command line.

These examples recursively fixes the folder "WhateverFolderName" and its contents. You may not need all these commands, it depends on the problem you are encountering. Please note, you will need to be in the parent directory where you are encountering these problems.

To fix Mac OS 9 lock file issues, you need to remove the immutable bit:

sudo chflags -R nouchg WhateverFolderName/

To change the Group of a folder and it's contents to "staff" :

sudo chgrp -R staff WhateverFolderName/

To change the Owner of a folder and it's contents to "administrator" :

sudo chown -R administrator WhateverFolderName/

To enable owner and group permission to read & write (rw) and to be able to open (execute) on folders:

sudo chmod -R ug+rwX WhateverFolderName/

back to index