Share Mac external HDs with Windows

Q. I have a MacBook and a couple of PCs. I also have an external 1TB drive on my Mac. I can mount the Mac’s internal hard drive on my PCs but I cannot mount the 1TB hard drive. Is this possible?

A. One of the cool things about Macintosh computers is that we’ve always been able to read data on Windows drives and floppy disks. In the past there were utilities to that enabled Windows computer to run AppleTalk protocol and read Macintosh volumes.

Mac OS X includes Samba which allows users to run SMB (Server Message Block) protocol. SMB was developed by IBM, but has been highly modified by Microsoft. The open source Samba has reverse engineered SMB to provide a version for non-Microsoft systems.

By running SMB on your Macintosh you can share your files with your Windows neighbors. Go to System Preferences -> Sharing and check Windows Sharing. Then PC users can add your Mac to their Network Places or “map” your drive as a network drive by adding \yourIPaddressvolumename.

The problem with external drives is that they are not automatically included in the smb shares. When you enable “Windows Sharing” a configuration file is written to the Unix file system. Most configuration files are stored in the “etc” directory and there you’ll find the “smb.conf” file.

So once again open the Terminal (Applications -> Utilities -> Terminal) and at the prompt enter “cd /etc” and press enter – to “change directories” the “etc” directory. You need to be an administrator to edit the file and you should begin by backing up the file. Enter “sudo cp smb.conf smb.bak” at the prompt to make a copy of the file. “sudo” is a special command that lets you act as an administrator for a short period of time.

Check that you’ve made a copy by listing the files with “ls –la” and Return. You should see both the original and the backup. Now edit the file with “ed”, “vi” or “pico”. With pico the display is similar to most text editors and the commands are at the bottom of the file. Enter “pico smb.conf” and scroll to the bottom (with Control V) and add the following to the bottom of the file:

path = /Volumes/LaCie_d2_156_GB
valid users = tmitra
writeable = yes

In the example above my “Share name” is “LaCie” – this is what the PC user will see. The Macintosh name of my drive is “LaCie_d2_156_GB” – note that I have replaced the spaces with underscores. The “valid user” is the name of a user on my Macintosh and “writeable” means that I can read and write to the drive.
Now on the PC go to “My Computer” and choose “Map Network Drive” from the Tools menu. Then in the dialog enter the Mac’s IP as the server and the share name:


Then enter your username and password and the volume should be mounted. You can then copy files to and from your PC – and share them with the Mac.

/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.