Connecting to a Mac OS X Lion SMB Share using Windows 7

By , January 17, 2013 12:19 am
It is possible to access the files on your Mac OS X Lion system from Windows using SMB shares.

It is possible to access the files on your Mac OS X Lion system from Windows using SMB shares.

This week I finally made the switch to Mac OS X 10.7 Lion on my Apple Mac Pro computer. One of the first roadblocks I hit was changes to Lion's Samba SMB file sharing protocol.

For further reading, there is an SMB related discussion on the Apple tech support thread:
Windows computers can not access smb-shares in Lion

Here's my solution for connecting the Windows 7 and Mac OS X systems together using SMB.

When I connect a Windows 7 PC to a Mac OS X Lion file server using SAMBA, the system expects the computer name (domain) to be written before the login name.

To start with, we need to find out the Mac systems "Computer Name" in the Sharing System Preferences window.

Open the System Preferences icon in your dock.

Mac OS X System Preferences

Click on the Sharing tab. Make a note of the Mac's computer name. In this example my computer is called Mac-Pro.

The sharing tab shows your computer name and allows you to enable file sharing.

The sharing tab shows your computer name and allows you to enable file sharing.

Now let's go back to the Windows 7 system.

Use the start bar to open the "Computer" window. Let's connect the Windows computer to the Macintosh's SMB share. Click the "Map Network Drive" button.

The map network drive button allows you to access SMB shares on your network.

The map network drive button allows you to access SMB shares on your network.

The Map Network Drive dialogue will allow us to connect a shared folder on another system. Let's connect to a hard drive called "Personal" on the "Mac-Pro" system to the Windows drive letter "Z".

Set the folder to:

\\Mac-Pro\Personal

If we enable the "Reconnect at login" checkbox the share will be mounted automatically when the Windows 7 computer is turned on.

Enable the "Connect using different credentials" checkbox to allow us to login to the Mac computer using a different username.

Click the Finish button to connect.

Map Network Drive

In the Windows security dialog the domain is listed as "HP". To connect to the Mac OS X 10.7 system we need to switch the domain name to the name of the Mac Pro system.

The Windows 7 system wants to use the PC's domain name. In this case the domain is set to HP.

The Windows 7 system wants to use the PC's domain name. In this case the domain is set to HP.

If the Lion file server's computer name is "Mac-Pro" and the user account name is "pete" you would login using the user name "Mac-Pro\pete".

You also need to type in the password. If you want Windows to remember the login details, enable the "Remember my credentials" checkbox.

Click the OK button to continue.

By entering the Mac Pro's computer name before the username we can switch the domain.

By entering the Mac Pro's computer name before the username we can switch the domain.

A progress dialog will appear and if the connection was successful the SMB share will be listed in the computer window under the section titled "Network location".

A progress dialogue will let you know if there were errors connecting to the SMB share.

A progress dialogue will let you know if there were errors connecting to the SMB share.

Tip: If you have issues connecting to the Mac OS X Lion system you can check the error messages in Kerberos log file located on the Mac at:

/private/var/log/krb5kdc/kdc.log

If the login was successful you should see your Mac SMB shared folder in the Network Location section of the Windows 7 Computer window.

If the login was successful you should see your Mac SMB shared folder in the Network Location section of the Windows 7 Computer window.

Print Friendly

4 Responses to “Connecting to a Mac OS X Lion SMB Share using Windows 7”

  1. Retrocosm says:

    Great post Andrew, something I've never had the patience to work out myself. Clear, concise and well laid out, cheers!

  2. Laptop says:

    I'm using Android and I still can't access my shared folder in Mountain Lion. The error is 'cannot access the folder' and I'm sure I'm using the correct username and password. Any thought about this issue ? thx

  3. Andrew Hazelden says:

    Hi Laptop.

    I don't have any experience with file sharing on Android. As an alternative to Samba SMB file sharing, are you able to connect to your Mac system using SFTP?

  4. Carl S says:

    Many thanks, Andrew, for posting this valuable, detailed information! And for really going the extra mile and creating highlighted screen captures on both the Windows and Mac sides!

    Ever since I bought MacBook Pro in the summer of 2011, I've tried occasionally to connect from Windows 7 to network shares on it. Until I read this post, I'd never found a method that worked simply and reliably.

    In the past, I've always stopped trying and relied on copying files to the PC while I was on the Mac. I've been experiencing -36 error codes using that strategy recently, so this information gets me out of a nasty jam!