Mac and Windows File Sharing: How to Connect

Macs and PCs play remarkably well on the same networks these days.  Both support the necessary interoperability right out of the box.  But when it comes to the details of the connectivity, that’s where people sometimes get lost.  After all we’re talking about two very different platforms in terms of connectivity and security.  For all of their similarities, the two platforms are still really quite different.

We’re about to detail the ins and outs of inter-platform connectivity.  In this case we’ll be connection to a Mac running OS X 10.4 from a Windows XP box, and conversely we’ll connect a Windows XP machine to a Mac.  While this post details Windows XP, Windows Vista will operate in much the same way.

Connecting a Windows XP Box to a Mac Share

We start on the Macintosh.  First pull down the Apple menu, select System Preferences, and click on Sharing.  Be sure to enable the Windows Sharing service.  Once it is activated, the accounts allowed access to the service must be selected.  If not promoted to specify the permissive account instantly, just click the Accounts button and select one or more usernames that will be allowed access to file shares hosted on the Mac.

Notice the message at the bottom of the window that explains the path that Windows users will use to access the file share.  Of particular note here is the computer’s IP address.  In this case, my computer’s IP is 10.0.1.100.  Its an internal virtual IP that is generated by my broadband router.

For all of the complexities involved, we’re actually nearly done.  That’s all it takes to activate Windows compatible file sharing on the Mac.  Now we switch over to the Windows XP box and take a look at one of several different ways to access the file share from Windows.

 

There are ways to browse network shares using what Windows refers to as My Network Places.  Give it a shot if you like.  The icon is either located on the XP desktop, or in the Start Menu.  I tend to avoid the method since Windows sometimes has a difficult time finding shares as the appear on the network.  At the same time, it also seems to have difficulty realizing when the shares are no longer available.

As a result, I prefer a more direct approach.  Simply select the Run option from the Windows Start menu.  A dialog like the one above will open.  Then, just enter the address of the remote computer that the XP box is supposed to connect to.  In this case it’s the Mac’s IP address preceded by two backslashes: 10.0.1.100.  Then just click OK or hit the return key.

 

If the remote computer is indeed online at the specified IP address, Windows will display a login prompt like the one above.  Here we enter the username and password that would normally be used to login to the Macintosh’s user account.  There is an option to allow Windows to capture the login and let the user avoid the password prompt in the future.

 

Once we clear authentication, we see a list of file shares on the remote Mac.  In this case we see a share called smanke.  This is actually my home folder on my Mac.  Inside that directory are all of the files located in my user directory on the Mac.  At this point I have gained access to all of my personal files- my desktop, documents, movies, music and more.

Connect a Mac to a Windows XP Share
Connecting to a Mac share from XP should be equally as easy.  In short, its not.  I’m not going to point fingers, just take a look at the following steps and it will become painfully apparent which platform turned to process into  a 10 screenshot process.

 

First we switch to the XP box and browse the hard drive.  Locate the directory to be shared and right click on it.  Select the Sharing and Security option and the window below will appear.

 

If the XP box had not been configured to share its folders or printers, the Shared File Properties will look as shown above.  Before the folder can be shared, the sharing services must be configured and activated.  Click on the text link titled Network Setup Wizard.

 

I’ve shortcutted the lengthy setup wizard for reasons on simplicity.  Rather than show every single screen in the process, I have opted to omit any step that served no configuration purpose.  When the Select a Connection Method screen appears, be sure to select the second radio button specifying that the current network is behind a router.

 

The only important field here is the computer’s name.  It must be a name that will be unique on the network.

 

Windows still requires that the PC be a part of a specific Workgroup.  If there are other Windows boxes on the network, make sure the existing Workgroup name is entered here.  If there are no other Windows boxes on the LAN, select something safe like HOME or OFFICE.  Anything will work actually.

 

This seems like an odd specification to make at this late point in the wizard, but it finally gets around to asking whether the sharing features should be on or off.  Obviously we want them turned on.

 

Here’s the fun screen we get to watch while XP makes the necessary low level changes.  Its interesting that it takes the Mac about 1 second to activate Windows file sharing but XP takes over a minute.

 

This screen is a holdover from the days when sharing files and printers was even more convoluted than it is today.  Just select the last option so we can get on with life.

 

This last screen goes back on my plan to only show relevant screens that showed selections vital to the configuration process.  But after such a long run of configuration screens, I though it might be nice to see what the finish line looked like.

 

The kicker here is that we have only activated the XP machines sharing features by this point.  Now, once more, we need to browse back across the hard drive and find the folder we originally wanted to share.  Again right click on the directory and select Sharing and Security.  The Shared File Properties window will appear.  Simply check the box beside Share this Folder on the Network and we’re finally done on the PC.

When we configured file sharing on the Mac, Apple’s developers were helpful enough to provide the Mac’s IP address and some basic instructions right at the bottom of the sharing window.  No such logic was used by Microsoft engineers so we’ll have to dig into the computer to find its IP address.

 

The easiest way to find the IP address is to once again select the Run option from the Windows Start Menu.  This time enter CMD into the field and click OK.  This will bring up a black command line window.  Simply enter the command ipconfig at the prompt and hit return.  The screen will shoot out some useful information like the image above.

In my case, my XP box has a special virtual network adapter called Hamachi.  Ignore that information.  Most machines will have a display of network information relating to either its wired of wireless network adapter.  In my case, the second set of information shows my wired Ethernet adapter.  Here we see that the IP address of my PC is 10.0.1.101.  Make note of that as we’ll need it in a little while.

As described in the first stage of this post, there are several ways to browse the networks file shares.  On the Mac, there is an option on the left side of every Finder window in OS X 10.4 called Network.  Clicking on it will browse the network.  The odd part here is the way the computers are displayed.  There is often a strange array of bizarrely named folders denoting virtual separations on the network.  I prefer to cut through all of this.

 

If we know the IP address of the XP box, there is a direct way to connect.  Just hit Apple+K in the Finder, or select Connect to Server from the Finder’s Go menu.  This brings up a screen like the one above.  Simply enter the IP address of the XP box preceded by smb://.  On my network, my XP box has an IP of 10.0.1.101 so I have entered: smb://10.0.1.101.  After that, just click Connect or hit the return key.

If the user account on the Mac and the PC have the same credentials, a screen like the one above will show a list of available shares on the Windows box.  Just select the share and then OK.  The Windows share will mount on the Mac desktop and can be used as expected.

 

If the user accounts differ between the two boxes, an authentication box will appear like the one above.  The Workgroup will likely already be supplied.  Just enter the login information for an account that exists on the XP box and proceed to login.  Once in the previously shown list of file shares will be displayed.

One of the nice features found in 10.4 is the ability to store the file share login in the Mac’s Keychain.  Selecting this box makes it easier and faster to connect to the same remote machine in the future.

Conclusion
All things considered, the process really was simple.  There might have been a few more steps involved that one might expect from a pair of mature operating systems, but to be fair only one of them made things more difficult than they needed to be.

We now have the ability to share files equally between a Mac and a Windows XP machine.  But now that Window Vista has shipped, some might want to connect a Mac to Vista.  Rest assured, the process to share files on Vista might offer a slightly different wizard but the concept is still the same.  And for a Vista user who wants to connect to a Mac file share, its nice to know that the process is exactly the same.  Using the Run command to connect to the Mac via its IP address works just fine.


Steve

UPDATE 6/5/07: 5:55pm
For those interested, I just put up another post detailing how activate, disable, and add rules to both Mac and Windows software firewalls.  Checkout the post here.

47 Responses to Mac and Windows File Sharing: How to Connect
  1. Anonymous Reply

    Good article; however with Vista we are finding that alot of the printers aren’t supported where as with XP most printers are. We run a full Microsoft network and have a simply HP DeskJet installed on a Windows XP box. All machines can see and print to the printer except for my Vista Business machine (go figure). Another thing with Vista and file sharing is the UAC or User Access Control; a new feature in Vista that locks everything down until you open it up and if you have the Windows firewall you’ll also have to add exceptions to be passed through ensuring you can actually connect to the machine.

    Just some of the things we’ve ran into thus far on an all MS network.

  2. Tony Reply

    I have my mac running wirelessly, I enabled window sharing and then typed in my account just you demo’ed and it said it couldn’t be found. What steps am I missing?

  3. smanke Reply

    Tony,

    See if you can ping each computer from the opposite machine. Also check the firewalls on each. I’m thinking that firewall might be on without a rule to allow access.

    This is one of the points I forgot to add to the original post. Disabling the firewall on XP or adding a rule to allow file sharing is almost worthy of another post it and of its self, but I can add the info if you need it.

  4. Tony Reply

    Yeah if you can add the info that would be great. I’m a web developer so when it comes to networking and hardware my eyes start to glaze a bit. If you could show me how to do that then that would make my day.

  5. Jonas Reply

    I’m having the same issue. Wireless macbook unable to access XP PC using login and password of user. Able to do it with wired mac… just not wireless one. I’m stumped.

  6. Luna Reply

    Thank you for this article! It was the first one I came across that explaned things pretty clearly. However, I am having the problem that my G4 Mac doesn’t seem to be connecting to the XP laptop I have. The error message I get on the Mac is “The Finder cannot complete the operation because some data in ‘smb://[isp number]’ could not be read or written. (Error Code -36).” I’m sure I have the correct PC IP address, but when I ping from my Mac, 0 packets are recieved. I also checked the Firewall and file sharing settings on PC and file sharing settings on Mac and they seemed ok. Do you have any idea where the problem might be? I am using an ethernet cable to connect the computers. My PC says that the Local Area Connection is Connected, so that seems to be working as well.

    Any help you could give would be GREATLY appreciated. I’m not too much of a computer person and I’ve been trying to figure it out all day!

    Luna

  7. Lost Reply

    Was working and no it is not!

    Unable to start Print Services!

    The Start is hazed out… Tried reseting permissions, cleaning out caches… etc

    Nothing seems to be able to restore this service.

    Error log is empty —- HELP!!!!!

  8. smanke Reply

    Lost,

    I’ve had issues like this with the web server. Somehow the config file gets hosed at the command line and the GUI disables the start/stop button as a result.

    You’ve tried the corrections I would suggest, so I’m left scratching my head.

    There is a command line admin pdf file out there from Apple. I don’t have a link off hand. If you can find it, you might be able to try some of the command line options to start and stop the service. The command line might shoot back some useful feedback as well.

    If the command line doesn’t give you any useful feedback, try checking the logs after running the commands. You might find something helpful there.

  9. Lost Reply

    Found – for those how may also need it!

    http://www.apple.com/server/pdfs/Command_Line.pdf

  10. Lost Reply

    Only error I can find is:

    Pre-authorization failed, giving up

    Yet it states that the service is running… or is it really?

  11. smanke Reply

    Sorry, that error is a new one on me. I’m not sure what’s going on there.

  12. smanke Reply

    I had a few people ask for information on working with the firewalls built into OS X and XP. I just posted a follow up story here: http://maclive.net/sid/237

    Take a look if you’ve had issues with the firewall.

  13. Lost Reply

    Web Services – Fails to restart if I reboot the server. Must manually restart all the time… any clues why this is not automatically restarting?

    Thanks for your help on the Printer – Resolved and working great!

  14. smanke Reply

    Lost,

    That sounds to me like some kind of corruption in the config file. The fact that it starts when you click it manually is puzzling.

    I’ve been in the apach.conf file and makes changes manually before. When I do, and I make a small mistake, the server won’t start the service until the config is corrected. I’m guessing the file might have been slightly corrupted on its own if you’ve never changed the file manually.

    It would be interesting to compare the config file from a clean install to what you have now and see if you can find a problem.

    Unfortunately, there’s just no easy solution sometimes. Even that is just my best guess. Maybe one of the other posters will have a better suggestion. This ones new to me.

  15. Lost Reply

    Apache.conf is clean

  16. Anonymous Reply

    What if my windows share name is something like this? \nasabc$ How can I connect from Mac? Help !

  17. Anonymous Reply

    What if my windows share name is something like this? \nasabc$ How can I connect from Mac? Help !

  18. BudhaChrist Reply

    I’ve got everything going fine. Connecting the PC to the Mac was very easy. But the reverse is proving to be a problem. I figurred out turning off the firewall on my own, but now I’m stuck at an authentication screen.

    I have four users on this computer, and I’ve tried the logins and passwords for every one of them. None work.

  19. Kyryacos Reply

    We have seted up a MAC OS X SERVER (raid) and setted up the windows users succesfully. We login just fine…now..HOW DO WE LOG OUT? It seems that the authentication thingy just stays in and if i go to the run line or browse to the same directory as the one i logged in before..even a day before!…well it doesn’t log me out :)

  20. smanke Reply

    Kyryacos,

    As far as I know, Windows keeps the login info for the selected share in cache until the system is rebooted or the user logs off the computer (at an OS level).

    I don’t know of any way to intentionally log the user out of the share without logging out of the computer. That’s always been an issue with Windows as far as I am concerned. There may be a command line option, but I am not aware of it.

  21. Kyryacos Reply

    Thank you for your reply mate. I ‘ll try figuring something else out. If you happen to come across anything please let me know

  22. Yaseen Reply

    I’m having an odd issue with filesharing! across platforms. I have a few pc’s and two macs all setup to use the same network and internet, but because my premises is so large, I’ve had to use a wireless access point to increase the area of my wireless network. what I’ve found is that even though all my pc’s can see and share with each other across the network irrespective of which wireless access point it’s connected to, the Macs can only share and connect to the machines using the same access point. I’ve experimented by moving the machines and connecting to the other wireless point but then can only see the machines that are connected to that one too.

    The odd thing is I can use the Internet off any access point, not only the main wireless router/modem.

    Any Ideas? I’m stumped. I’ve checked the firewalls and even if they’re off I still can’t see the other machines.

  23. smanke Reply

    Yaseen,

    I’m betting that your wireless access points are giving off their own DHCP addresses, acting as routers in a way. If I’m right, you should just need to make sure that are working as strictly access points and not doing their own DHCP distribution. You want to let you main router do that.

    If the main router is the only DHCP server, all computers should pull from the same pool of addresses and the network should work as one. No routing should be done in the access points. They just extend your existing network to wireless.

    If you don’t have the AP’s providing DHCP addresses and they are functioning strictly as AP’s, then you have me stumped too.

    Good luck!

  24. Anonymous Reply

    I have a Vista desktop PC where I would like to keep my files. I want to be able to access the files from my ibook. I shared the drive that I want, but for some reason I can only access one folder on it, granted it’s the one I will use the most, but I’d like to be able to access all of the folders. The folders show up, but the contents are empty, when I know that there are files in them. Also, I tried to set up all permissions (read and write capable) but I can’t seem to write anything to the shared drive. When I hit “get info” for the drive, it says that I have read and write permissions. The pc is wired via ethernet cable to the router, and I’m using wireless for the mac.

    Thanks in advance.

  25. smanke Reply

    From the sound of it, your drive is formatted with NTFS. If that’s the case, there are 2 sets of permissions you need to keep an eye on. There is the basic permission you set in the sharing tab that lets you specify who you share the directory with, then there are the NTFS permissions that still apply to the directory and its files.

    I’m not sure what’s going on here, but it sounds like a permission problem in one of those 2 areas.

  26. Anonymous Reply

    many thanks++ very helpful article and it worked

  27. qmark Reply

    Smanke

    Could you be a little more specific about the problem described by Anonymous on march 20’th? I am having the same problem. When I have shared everything in my vista-pc, the folders are empty when I access them from the mac. NTFS permissions, where do I find them?

    Thx for a good article anyway:)

  28. Anonymous Reply

    Smanke,

    Great article and very helpful! However it doesn’t appear that you discussed how to access files on the Mac from the PC only vice versa.

    For some reason i can ping the pc from the mac but can’t ping the mac from the pc. Even if i try to browse the Mac by entering \mac’sipaddressusername it always says network path not found.

    Obviously the mac is the one blocking the incoming requests but i have no clue why. The firewall is off and windows file sharing has been enabled.

    What am I missing?

  29. smanke Reply

    Anonymous,

    It sounds like you have it right. I would double check both firewalls though. It sounds like one of them might still be on.

    When you connect to a machine from the Mac, select Connect To Server from the Go menu in the finder. Then just enter the IP of another Mac in the field, or smb://ipaddress if its a Windows box that you want to connect to.

    That should allow the connection assuming the firewalls are all down.

    Good luck!

  30. smanke Reply

    qmark,

    I’m sorry for the delay in responding. I have been away.

    I’m not sure what’s going on here. From what I can tell, it must be a permission issue. With Windows, there is normally a shared permission where you specify what users can access the share. But in addition to that, the files in the shared directory need to have their NTFS permission set to allow access. It sounds to me like the NTFS permissions are not set for the directories to allow that user access to the files.

    Good luck!

  31. Chad Reply

    Smanke,

    I was the anonymous that posted 02/11/09. Ok I have been able to successfully connect from the Mac to the PC and I can browse files and folders just fine. However, on the PC when I go to start->run-> and then type \ipaddress as your article says, it always says ‘network path not found’ and it never pops up with the login screen (your 3rd screenshot in the article).

    Aside from that I tried to ping the Mac from 2 different PC’s with no luck. However I can ping both PC’s from the Mac. I have the Mac firewall completely off and the Windows firewall is setup to allow file and printer sharing.

    Why is the Mac blocking incoming connections but not outgoing connections to the PC’s?

  32. smanke Reply

    Chad,

    This is odd. They can ping but not connect. Could your Mac be running Little Snitch? Its a long shot, but the only thing I can think of.

    Are all of the machines on a wired network? I’m just wondering if there could be a double NAT situation. Like NAT and the main router and then NAT again on the wireless before you reach the workstation.

    A ping might traverse that alright but the rest of the mapped ports might not.

  33. Chad Reply

    I am not sure what Little Snitch is but I doubt it because it is a company computer. And yes all of the computers are on a wired network. I am not sure what NAT is though. Is there anything else I could tell you that may help?

  34. smanke Reply

    Hmm…

    If you are wired, then its less likely that its a double NAT. But it does sound like there is something else getting in the way.

    Does the company use a domain controller of some kind? Like a Windows Active Directory Server or Open Directory? I’m just wondering if the traffic could be routing through that.

    I have to say, I am stumped here. I really wish I had the silver bullet for this.

    One thing worth double checking. This happens to a lot of people. Make sure that the IP addresses on the different networks are on different subnets. For example, if your remote network IPs are 192.168.1.x, make sure the addresses on the secure network are anything else, like 192.168.2.x or 10.0.1.x.

    One other issue comes to mind. Its almost impossible to test the VPN connection from inside the secure network. Make sure that when you test the connection you are doing it from a machine that is off the secure network. Its a pain, but you have to test it from home or a cell card network connection. This keeps the routing from doing unexpected things. I have tried it myself. Pure chaos.

    And the idea of testing with a cell modem brings up another issue I have had. Some times I just can’t get it to work via cell modem at all. Still not sure why. I need to spend some time a try to figure that one out.

    I hope that helps some. I really have to say that you have stumped me here. Its so hard to say what could being going on configuration wise on either of the networks.

    If anyone else has an idea, please chime in!

  35. Chad Reply

    Thank you very much for your help so far! Yes the company computers are linked to a domain and I believe there is a windows active directory which includes all employees login accounts as well as the IT administrators. I am assuming you want to tell me to just get our IT techs to figure it out, but unfortunately they are extremely busy and rarely have time to come and do stuff like that. Another thing about the staff is that they are all familiar with PC and not Mac. Our Mac is the only one in the whole company (its a video editor) and the only reason we have the Mac is because the last IT tech who is no longer here was a fan of Mac over PC. So that being the case, I have taken it upon myself (i know very little about networking) to setup what i thought would have been a simple task!

  36. smanke Reply

    Ok. That helps. I’m really wondering if network traffic is going through a proxy of some kind or network address translation (NAT) somewhere on the corporate network. It could happen in the domain controller depending on how its configured.

    Most domain controllers run DNS and routing option can be activated as well. This could be where the problem is happening.

    If that’s the case, I don’t think you will be able to do much about it.

    If you haven’t tried connecting via PPTP as opposed to L2TP, it might be worth a try. I don’t know if it will matter, but I have found PPTP to work at times when L2TP would not establish.

    I would really love to see you get this working. Especially to help cement the Mac platform on the Windows network. I’m just afraid that the Windows domain is doing something that is preventing it. And, in my experience, messing with the finer setting on a domain can be a nightmare. IT won’t touch that come hell or high water.

    I would love to recommend Hamachi as a good alternative but their Mac support has been lacking. They have no GUI to control the VPN client. If you are comfortable with the command line, it might be worth looking into.

    Here’s the link:

    https://secure.logmein.com/products/hamachi/vpn.asp?lang=en

    Here’s their forum where you can learn more about Mac support:

    http://community.logmein.com/logmein/board?board.id=HamLinOSX

    Great and powerful concept, but it just needs to have the GUI control finished.

    I’m sorry I can’t be of more help. This process should be a great deal easier than it is. Maybe in time.

  37. DrChunks Reply

    Hello,

    I manage a church network that has several PCs and two macs as well as a NAS. The mac used to be able to connect to the NAS just find. I could just open it up in finder and didn’t even need to “connect to server.”

    Now however the mac cannot connect to the NAS while the PCs can just fine.

    i can connect to the server from the mac using “connect to server” and smb://129.168.x.xxx but not to the NAS. Everytime i do it asks for my user name and password and then doesn’t connect and gives me an error code 36 along with the message, “the finder cannot complete the operation because some data in “smb:://192.168.x.xxx”could not be read or written.”

    any help would be greatly appreciated.

  38. ASpeck Reply

    I’m trying to map a MAC server to our PCs. I enter in the IP addressServerName and when it promts me I enter in the User&Password of the Admin on the MAC, it thens maps the Server but we don’t have access to all the folders on the server. We can only see folders with-in the main user, but not all of them either. Why? I have created an account, created a shared user and checked every folder to be shared by that user. So why can’t I see all the folders?

    Any help grealty appreciated

  39. ASpeck Reply

    I set up the network to use the same workgroup name as the PCs under Network/WIN and I also added the one folder we want to see as a shared folder and still can’t see it.

  40. mikenthompson@comcast.net Reply

    I have a network HDD attached to my wireless router. My windows XP PC connects to it fairly easily, but my MAC running tiger OSX doesn’t seem to find it. Any help?

  41. smanke Reply

    See what the IP of the router is. Likely something like 192.168.1.1, or maybe 192.168.2.1. Then select Connect to Server from the Go menu in the Finder. You should be able to enter smb://192.168.1.1 (if that is the router IP) and you should be prompted either for a login or see a list of shares on that drive.

    That would be the standard way to access the data. Though the router docs should have some sort of instructions if this does not work.

    Good luck!

  42. astnpwr707 Reply

    I have a question. I am sharing my external hard drives that are connected to my Mac out on a local network we have. In the Sharing, I’ve designated Everyone as Read Only yet they are still able to write to my externals. The machines connected to the network are both Windows and Mac OSX. I haven’t verified whether or not the Mac machines can write to the hard drives, but the Windows machines definitely can. Is there a way to fix this?

  43. smanke Reply

    astnpwr707,

    I think you have write access because that Windows box is logging in with a username and password for an account with right access. You may have logged in on the Windows side once and the OS saved the login for future access.

    You might create a new test account on the Windows box to try and login with no possibility of a cached or save login. I think that, if you try that, you will only have read access.

    That said, I’m not sure where Windows saves that login so you could just delete it. But I am fairly sure it has saved it.

  44. iMacker Reply

    Here is an easier way to access your Windows Folders and Files from you Mac Machine using SMB command

    http://surreystore.com/cms/apple/39-how-to-access-windows-shared-files-from-a-mac-.html

  45. Anonymous Reply

    Awesome write up. Very detailed and to the point. Thanks much!

  46. Anonymous Reply

    What if there is no Windows Sharing check box on my mac? I have v10.6.8 and there is no windows sharing box. Not sure what to do.

  47. Mac Error Code 36 Reply

    It is often related to disk errors where the Finder can’t read a file correctly. That can indicate a problem with the file(s), or the disk itself.

    Video:

Leave a Reply

Your email address will not be published. Please enter your name, email and a comment.