The Quick Way to Connect to a Network Drive using Mac OS 10.5 Leopard

I’ve posted a few times about the problems I’ve had connecting to a network drive using Leopard. Previously I posted about how Leopard was able to connect to a network drive, but wouldn’t show the contents of the shared folder. After a lot of testing, and a bit of luck, I followed that up with a post on how I was able to browse the folders on my network drive. Now, I’ve found a way to connect to my network drive and browse the folders almost immediately. Although this method may sound a bit convoluted, there are just four steps. As I only have my MacBook to test with, I can’t guarantee that this will work for you, but I don’t see any reason why it shouldn’t.

Step One

Connect to your network drive in the usual manner. Either use the Command-K shortcut, or from the Menu Bar use Go -> Connect to Server. In either case, you’ll be presented with a Connect to Server dialog box. The server address should be specified as:

smb://network.drive.ip.address

Click the Connect button and wait for Finder to connect to your network drive. If you have more than one shared folder set up on the drive you’ll be prompted for the folder that you want to connect to. Once Leopard has connected to the shared folder a new Finder window should open.

Step Two

Open Terminal from Applications -> Utilities -> Terminal. At the prompt, type the following command:

sudo smbclient -L NETWORK_DRIVE_NAME

The NETWORK_DRIVE_NAME refers to the the Windows name for your drive and is usually set using the configuration interface for the drive – this may be a web interface or an application, the exact details will depend on your specific drive. When you press Return, you’ll be prompted for your password. Type your password and press Return again. When you run this command, you should get a response like this:

Receiving SMB: Server stopped respondingsession request to NETWORK_DRIVE_NAME failed (Call returned zero bytes (EOF))Receiving SMB: Server stopped respondingsession request to *SMBSERVER failed (Call returned zero bytes (EOF))

Although the Samba Client returns with an error message, don’t worry, you’re still on track to be able to browse the drive contents.

Step Three

Restart the Finder. This is achieved by typing the following command in Terminal:

sudo killall Finder

Once this command has been entered, the Leopard Finder will restart. You’ll notice that your Desktop icons disappear, as will any open Finder Windows. Your Desktop icons should reappear almost immediately.

Step Four

Repeat Step Three:

sudo killall Finder

Open a Finder Window, and under the Shared section your network drive should be listed. Click the drive name, and then double-click the shared folder name. You should now be able to browse the contents of the drive.

Important Notes

  • I don’t know why, but the Finder has to be restarted twice for this work.
  • The Terminal commands must be run using sudo or as root (using su), even if you are logged in as an adminsitrator. If you are an administrator, you’ll be able to run the smbclient command and the killall command, but the process just won’t work.
  • I have no idea why this works, or how, I just know that it does work for me.
  • I’d recommend that you close all open programs while doing this, just in case. Using the killall command may have some strange effects on open programs, or lead to system instability.
  • Once again, I haven’t been able to test this on any other system other than my own, so your milage may vary.