Samba – How to setup shared folder as virtual directory in IIS 7.5 (cross-domain)

cifsiis-7.5sambauncvirtual-directory

This is my current understanding of how this should be done:
(TL;DR for the actual problem, please see the bold text.)

  • Create a folder on you storage server, henceforth known as B.
  • Create a local user account on B, henceforth known as BUser
  • Share that folder
    • In folder properties>sharing>advanced sharing>permissions, add BUser and give full control
    • In folder properties>security>Edit… , add BUser and give full control
  • Create a local user account with same name/password on your web server, henceforth known as A
  • In IIS settings, navigate to the node under which you want to create virtual directory
  • Right-click > Add Virtual Directory… –In Alias, put the name that you want the directory to appear as
    • In Physical Path, put: \B\shared-dir
    • Click Connect As…
      • Enter the username and password of the local account(s) that you created earlier.
    • Click Test Settings…
      • Green check icons on both items indicate that your share is accessible and fine.

– Right-click the virtual directory > Explore
– Get error, either: "the specified network password is not correct."
– Or: "Logon Failure: Unknown username or bad password."

It appears that the errors above are selected at random, but the second one seems to be a bit more common when trying the last step multiple times. I am totally stumped as to why. Any ideas?

Best Answer

It's because when you click 'Explore' in IIS Manager, you are using IIS Manager with a user account (most likely the local Administrator) of that box that does not have access to the share. You can fix this by synchronizing the Administrator passwords on both the web server and the storage server.