/etc/master.passwd: no such file or directory

Q. 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 , it came up with an error saying that ‘/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?

A. 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 the 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 a dialog box with a progress bar indicating the extensions load and then 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 plug the Mac into another in target mode and use a FireWire cable to plug it into another Macintosh. 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 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 you drive (since you started from the DVD) you change directories or type ‘cd /Volumes/Macintosh HD’ and press return (we press ‘Return’ to execute a UNIX command).

If you don’t have the DVD, you can start the Mac holding the ‘Cmd & 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 link’, the UNIX equivalent of Mac ‘alias’ or Windows ‘short cut’. 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 like as 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 with 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’. So 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:
Type ‘reboot’ and press 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 you regular account.

One Reply to “/etc/master.passwd: no such file or directory”

  1. Dear IT guy. This looks like just the page I need to fix my late friend’s Mac, but it has all kinds of Word display errors, on Firefox and Chrome.

    I edited them out in the copy I made myself, so I’m fine, but I thought you’d want to know.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.