Windows 10: Accessing public and private shares from Windows


  1. Posts : 405
    Win10 x64 Pro -2 desktops, 1 laptop
       17 Feb 2018 #1

    Accessing public and private shares from Windows


    Last I knew the Windows implementation of SMB allows only one set of network credentials for a given pair of Windows user name and a remote NAS. That means a user cannot access both a public and a private share on the same NAS. I know this has been discussed before but I don't remember seeing any good circumventions.

    The following is what (I think) I know about this topic. I would love to here if any of it is incomplete or incorrect.

    If the NAS has a static IP address multiple names can be assigned to the IP addr on each computer using the etc\hosts file. And I vaguely remember that you can have one set of credentials using the IP address and another using the DNS name. But I would prefer to use dynamic addressing. I've been bitten in the past by having obsolete records in my etc\hosts file, and I recently heard that Windows sometimes deletes etc\hosts. (I haven't seen that happen. It would have saved me some grief if Windows had deleted mine a while ago.)

    If I had access to my local DNS server I could add an Alias or CName record but my DNS server is buried inside of a router/wireless access point box and (as far as I can see) provides no aliasing capability.

    If the IP Resolver component of Windows allowed tweaking I might be able to provide my 3 computers with the equivalent of a CName record but I think the etc\hosts file is the only tweakable part of the Resolver.

    If a caching/forwarding DNS server were available for Windows I could probably give it DNS Alias records but I don't think there is a Windows DNS server except for on servers. And that would really be an overkill solution ... which I might be willing to try.

    I guess I could get a separate router/DNS server that would let me add CName records but tryinging to figure out the configuration hurts my head. I'm not sure it would work at all (unless maybe if the NAS had its own LAN segment connected by that new router).

    Am I missing an easy solution here? How do other people cope with this?
      My ComputerSystem Spec


  2. Posts : 13,746
    Windows 10 Pro
       17 Feb 2018 #2

    pokeefe0001 said: View Post
    Last I knew the Windows implementation of SMB allows only one set of network credentials for a given pair of Windows user name and a remote NAS. That means a user cannot access both a public and a private share on the same NAS. I know this has been discussed before but I don't remember seeing any good circumventions.
    I might have misunderstood your point, but at least I have no issues accessing both private and public folders / shares on my NAS. Of the NAS shares I always map (see screenshot), I access share Kari with one set of credentials, Public requires no credentials because, as the name says, it's meant to be public. Share OD, my local backup for everything I store in OneDrive is again accessed with same credentials than Kari:

    Click image for larger version. 

Name:	image.png 
Views:	18 
Size:	88.7 KB 
ID:	177534

    When mapping a network share, you can use different credentials for each share simply by selecting this option:

    Click image for larger version. 

Name:	image.png 
Views:	20 
Size:	104.8 KB 
ID:	177533

    The above option is not required to access public shares on NAS.

    Kari
      My ComputerSystem Spec


  3. Posts : 405
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter
       17 Feb 2018 #3

    Hmm. I'm going to have to look deeper into this. I have always had trouble with that and have read (apparently incorrectly) that a public share does take a place in wherever Windows saves credentials - effectively saying that credentials aren't needed. I have the public share permanently mapped; when I try to access the private share in File Explorer I get "Windows cannot access ..." (with the private share name provided). If I just provide the name of the NAS File Explorer brings up the public share.

    Issuing Get-Smbconnection in an elevated PowerShell I get a response showing the credentials:
    PS C:\WINDOWS\system32> Get-SmbConnection
    Code:
    PS C:\WINDOWS\system32> Get-SmbConnection
    
    ServerName ShareName UserName             Credential           Dialect NumOpens
    ---------- --------- --------             ----------           ------- --------
    MyBookLive Public    PUGET-116877\Patrick PUGET-116877\Patrick 2.0.2   1
    And when I try mapping the private share without first going through FileExplorer Windows I get a popup saying the share is already mapped using different credentials. (It is not.)

    Update:
    I did some more searching and found a description of what I'm seeing:
    https://support.microsoft.com/en-us/...o-a-network-sh

    That's a fairly old article - doesn't mention Windows 10 - but it was updated on June 18, 2017.

    Obviously you are not running into this, but just as obviously, I am.
      My ComputerSystem Spec


  4. Posts : 13,746
    Windows 10 Pro
       18 Feb 2018 #4

    I had to test this. I found out that I was partially wrong, I apologize it.

    There are no issues in mapping both my personal shares and public (no credentials) shares at the same time. That part was correct in my previous reply. However, adding a share with different credentials, that's where I was wrong. It simply does not work.

    I added a user / share Test on my NAS, with different credentials. Trying to map this share gave the error message you told about:

    Click image for larger version. 

Name:	image.png 
Views:	16 
Size:	55.6 KB 
ID:	177544

    I need to study this more.

    Kari
      My ComputerSystem Spec


 

Related Threads
How to Set Network Location to be Public or Private in Windows 10 A network location identifies the type of network that a PC is connected to with a network adapter. By default, the first time you connect to a new network (wired or wireless),...
Accessing default shares in Network and Sharing
I have two Windows 10 PCs on the same home network and I can't access the default shares on either one of them, I keep getting 'Access denied'. Any ideas?
My wifi network is public and i cant seem to get to the options to make it private. When I go to network/internet wifi i don't get the option to manage known networks. I can get to manage known networks another way but on the wifi network i want to...
Accessing administrative shares in Network and Sharing
I have a networked Windows 10 Pro computer A with built-in 'Administrator' account disabled. However, it has a "normal" administrator account named 'Admin'. I would like to access administrative share '\\A\C$' from another computer B in the...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 09:48.
Find Us