Connecting to Windows shares from Mac OS X

In this article you will learn how to use the Mac OS X Connect to Server option to establish client connections to Windows-based SMB shared file system resources.

Timothy Warner By Timothy Warner - Wed, July 20, 2011 - 13 comments

Timothy Warner is a Windows systems administrator, software developer, author, and technical trainer based in Nashville, TN.

Here’s the scenario: you are called in as a consultant to a school that employs a mixed Windows/Mac OS X environment. At one point during your work you realize that you need to transfer some administrative files to the Mac from a shared folder named DOCS on a Windows Server 2008 R2 file server named SERVER01. However, you have limited experience working in Mac OS X. What action do you take next?

By the conclusion of this article you will fully understand how to access Windows file shares from Mac OS X. Let’s get to it!

Preliminary terminology

As you know, the de facto file and printer sharing protocol in Windows is called Server Message Block, or SMB. In turn, SMB is also known in vendor-neutral circles as the Common Internet File System, or CIFS.

Mac OS X-based systems have long been able to access SMB shares hosted in Windows by employing the open source Samba network file system.

NOTE: Due to a recent changes in the GNU Public License (GPL) version adopted by Samba, Apple plans to remove Samba from future releases of its operating system, instead opting to re-write the protocol itself

We can access SMB resources by employing standard Uniform Resource Locator (URL) syntax, substituting smb for the more commonly seen http. Here is the general formulation:

smb://<hostname_or_IPAddress>/<sharename>

For instance, we can use the URL syntax smb://server01 to enumerate all shared resources on that server, or we can use smb://server01/docs to view the contents of only the docs shared folder.

Connecting to a Windows share on Mac OS X

From your Mac OS X computer’s desktop, click Go > Connect To Server or press Command + K.

Windows share on Mac OS X -  Connecting to a remote server in Mac OS X

Connecting to a remote server in Mac OS X

In the Connect to Server dialog box, type the SMB path to your desired remote Windows server. Depending upon the host name resolution strategy in use on your network, you can use either the server’s DNS host name or its IP address. Next, click Connect.

Windows share on Mac OS X - The Connect to Server dialog box

The Connect to Server dialog box

Windows share on Mac OS X -   Connecting to server

Connecting to server…

You will next be prompted for Windows user credentials; these credentials can exist either in the Security Accounts Manager (SAM) database of a single Windows computer, or they can exist in Active Directory Domain Services (AD DS).

For Connect as: make sure to select Registered User and then supply your Windows account username and password. To be safe, I recommend that you supply your username in the “old school” NetBIOS format domain\user.

If you want Mac OS X to store your credentials in the keychain of the local system, then enable the Remember this password in my keychain option. Next, click Connect.

Windows share on Mac OS X -  Credential validation in Mac OS X

Credential validation in Mac OS X

If the credential validation completes successfully, then the Windows SMB resource is mounted as a “drive” on the Mac desktop and its associated Finder window opens.

Windows share on Mac OS X - A mounted SMB share

A mounted SMB share

Windows share on Mac OS X -  Contents of the remote share

Contents of the remote share

A Couple of extra tips

Press Command + K to return to the Connect to Server dialog. Please note that you can use the Plus button to add the current connection URL to the Favorite Servers list. This will make subsequent connections much faster, especially if you elect to store your credentials in keychain.

To unmount an SMB volume, right-click the volume and select Eject.

Windows share on Mac OS X -  Ejecting a mounted volume

Ejecting a mounted volume

To create a persistent mapping to a remote Windows share, then you need to specify a new login item or login hook. We’ll cover that topic in an upcoming installment (are you already on the edge of your seat?)

Conclusion

I’m sure there are some die-hard Terminal fans out there who may be boiling with the thought, “But Tim, you can also use smbclient from a Terminal prompt to do the same thing!!” True enough—perhaps in a future installment I will show you that and other command-line Mac/Windows tricks. In the meantime, please feel free to leave feedback in the comments. Thanks so much for reading, and take good care.

-1+1 - Rate this post
Loading ... Loading ...
Disclaimer
Your question wasn't answered? Please ask in the new 4sysops forum!

13 Comments- Leave a Reply

  1. Michael H. says:

    Another very useful tip is found here:
    http://support.apple.com/kb/ht1629

    It’s the command to disable the creation of the hidden .ds_store files when connecting to a network drive. As a system admin, I hate when this isn’t done, because your file server will get littered with those files all over the place!

  2. scott says:

    Does this work if SMB signing is enabled on the server?

  3. Tim Warner says:

    Hey Scott,

    This is a great question. The short answer is a qualified “yes,” but be on the lookout for a new 4Sysops post on this subject; I’m writing it up now.

    Michael H,

    Thanks for pointing us to that article. I agree with you that those resource files can be confusing for Windows people. :)

    -Tim

  4. David Nemeth says:

    There is a KNOWN confirmed bug with Mac OS 10.5.8 and Word from Mac Office 2008/2011 (latest service pack as of 7/22/2011) and most windows server services (2000 SP4, XP SP3, Windows 7 SP1, Windows 2003 R2 SP2, WIndows 2008 R2 SP1)

    When you open a word document (.doc), edit the file, save it then try to close the window or exit out of Word, word just hangs. When I contacted Apple they punted the issue to Microsoft saying, Office is NOT our product. I then contacted Microsoft and using a Professional support call described my problem to them. After several network traces later, MS contacted an Apple Engineer who came back and said that this is a known problem in 10.5.8′s SMB, a fix is available for 10.6.x but they will not retrofit it to 10.5.8.

    The problem does NOT occur with Excel docs NOR with docx files. Issue also occurs with Adobe Photoshop/Illustrator CS4.

    We ended up having to move to a NAS device that supports AFP and are in the process of moving several Gigs of data from the SMB share to the NAS device. So much for all that compatibility… There is a reason why businesses (should) stay away from Apple’s OS’ – they only get support for a few years where MS supports them for much longer.

    Lots of others have reported this issue although under somewhat different circumstances.
    http://word.mvps.org/Mac/CantSaveToServer.html

  5. David B says:

    Tim,

    I followed your instructions to connect via smb from Mac 10.7.2 and file shares on a windows 2008 R2 server with different results. I can map my user share and a department share on a pc without any problems. If I try it on the mac I get mixed results. I can map the department folder and see all the files but when I use the same credentials but just change the user folder name for my user drive it says that “The folder can’t be opened because you don’t have permission to see its contents.” Any help is much appreciated. Thanks, David

  6. David Nemeth says:

    This sounds like an issue with the NTFS permissions and how the Mac truly authenticates to the share.

    Have you tried adding the “NETWORK SERVICE” account to the NTFS file permissions and/or to the share itself + all files below it? This has been an issue since 10.5.x…

    There is a reason why Macs only make up a few % of the total # of computers at most corporations…

    David

  7. Monty Baker says:

    Hi Guys, I also have the problem David B stated,
    and cant map anything from my Server2008r2 file server, I can see it as I get prompted for credentials but cit tells me I dont have permission.

    This macbook is for the FD so its pretty important :-/

  8. David B says:

    I had contacted Apple and they gave me the following link that you will be able to use to fix the problem. In a nutshell, the only thing you have to do on Windows server with the folder(s) you are accessing is give the Mac user permission to every folder on the tree. Not the greatest use of security but it works. Here is the link:
    http://support.apple.com/kb/HT4829?viewlocale=en_US

    David B.

  9. Tim Warner says:

    David B, you rock. Thanks so much for the information and the help link. -Tim

  10. Robert says:

    You rock! Simple and accurate.

  11. Tim Warner says:

    Thanks, Robert! I’m glad you found this article helpful. -Tim

  12. Milad says:

    tnx
    so helpful

  13. Debal says:

    This was a helpful trip, but does NOT work for me. After the “Connect to Server” dialog box appears and shows the attampt to connect to the remote server, it gives the message: “Connection failed: The server “192.168.1.111″ does not exist or it is unavailable at this time…” Although I obtained the correct IP address of the Windows PC.
    I checked all possible errors – file sharing, screen sharing, etc. but still cannot connect to the remote Windows machine.

Please share your thoughts in a comment!

Login

Lost your password?