The other day when my Macintosh started, it came up with the registration screen but it wouldn’t let me quit. So I restarted my Mac. Then it came up with an error saying “/etc/master.passwd: no such file or directory”. I don’t want to erase my files and I can’t reinstall the system. What can I do?
Normally when a Macintosh starts up it looks for specific files on your hard drive. These files may have become damaged or corrupt during a crash or if you forced it to reboot. During start up, the machine will test its components, checking the RAM and connections and “chime” to let you know it passed the tests.
Next you’ll see the Apple logo and then the spinning pinwheel while it loads the operating system. If successful, the screen turns blue and you’ll see the mouse pointer icon. Soon after, there’s a dialog box with a progress bar indicating the extensions load and then the blue screen soon reveals the login screen (or goes directly to the Finder).
In the case of the error mentioned in the question, you don’t get to the login screen because the Macintosh cannot find certain files it needs to log you in. This is where we rescue the Mac using our UNIX arsenal of tools. If you’ve followed my columns you’ll know that one of the things I love about Mac OS X is that it is at its heart based on UNIX. What has happened here is that a couple of UNIX directories are missing (or seem to be.)
There are at least three ways to get to the command line on a Mac that won’t start. You could use a FireWire cable to plug it into another Macintosh in target mode. To enter target mode, you hold down the “T” key while your Mac starts. You’ll see a FireWire Icon (instead of an Apple logo) and your drive will appear on the second Mac as a hard drive—but you won’t see the UNIX files that we need to fix except on the command line.
Insert the Tiger Install DVD into the DVD drive. Then hold the “C” key while starting your Macintosh. When the Installer starts, choose “English” and click “Continue”. At the next screen you’ll see a Utilities menu, from which you can choose “Terminal”. Voila! The command line appears. To navigate to your drive (since you started from the DVD) you change directories or type “cd /Volumes/Macintosh\ HD” and press return (pressing “Return” executes a UNIX command).
If you don’t have the DVD, you can start the Mac holding the “S” key. This will start the Mac in “Single User Mode” and your monitor will be a terminal. Next mount the drive by typing “mount –uw /” and press Return. You’ll already be on your hard drive so navigate to top (or root) of the drive with: “cd /”.
Next you should check and to see if two files are present. These are actually “symbolic links”, the UNIX equivalent of Mac “aliases” or Windows “short cuts”. So we list the contents of our hard drive with “ls –la” and you should look for two items named “etc” and “var”. The reason why the Macintosh can’t start is because one of these is missing or damaged. They should appear as “etc –> /private/etc” and “var –> /private/var”.
If they don’t appear as described above then we can rename them with “mv” and the recreate the symbolic links. So type “mv etc etc.bad” or “mv var var.bad” – followed by a “return” and the files will be renamed. To recreate the symbolic links we type “ln –s /private/etc etc” (return) and/or “ln –s /private/var var” (return). Then we once again check to see that the files are there and correct with list. Type “ls –la”.
If they appear to be correct:
lrwxrwxrwx–t 1 root admin (date) etc –> /private/etc
lrwxrwxrwx–t 1 root admin (date) var –> /private/var
Then you can restart the Mac by typing “reboot” and pressing Return.
When the Mac restarts, the setup screen may appear again. Create a second user account and when the Finder loads you’ll be able to switch to your regular account.
Timothy Mitra, IT specialist (IT Guy)
Do you have a question you would like answered by the IT Guy? firstname.lastname@example.org 416.278.8609