3

Is it possible to connect to multiple network shares on the same Windows 7 host using different credentials?

Example: Host H has shares \H\A and \H\B. Share A is configured to be only accessible by user account U1 (via Properties>Security tab), and share B is likewise configured to only be accessible by user account U2. I know the credentials for both U1 and U2. Is there some way I can connect or map to both shares simultaneously from my PC?

I've tried simply connecting to one and then connecting to the other, but I get an error message "You do not have permission to access \H\B". I'm never given the option to enter alternate credentials.

Note - I've already read this question, but there the OP is trying to map multiple shares using the same credentials. In my case, I'm attempting to connect/map using different credentials.

2
  • 1
    You have the same basic problem as the question you linked because you do not map multiple network shares but the same share twice. For windows the share is H in you case and A and B both belong to it. Per share only one connection is allowed imo(which is horribly stupid btw). Afaik there is a workaround if you map one with the hostname and one with the ip of the host
    – Syberdoor
    Jul 1, 2015 at 6:40
  • @Syberdoor okay, that's what I feared. Nice tip on using the hostname and IP though. If you want to make that an answer I'll accept it.
    – Kevin K
    Jul 1, 2015 at 13:46

2 Answers 2

6

You have the same basic problem as the question you linked because you do not map multiple network shares but the same share twice. In your case Windows would identify H as the share and A and B merely as subfolders so it would not let you make multiple connections but reuse the first one (If you used net use to map the second one explicitely specifying a different user you would get the "The network folder specified is currently mapped using a different user name and password." message)

I never found a real way around this, but there is a workaround. Windows seems to be perfectly capable of doing the mapping technically but checks on the name. So if you use the IP address for one folder and the hostname for the other (or if you have the possibility to use aliases for multiple hostnames) it should work.

4
  • I tried using the workaround on Win10 with no success. Still got errors 86 and 1219. Jun 18, 2020 at 18:41
  • I just checked on my 1909 PC and it is still possible, however it only worked in my quick test when one of the users was the currently logged in one. So one time net use with /user:xxxx and one time without user parameter worked, Two times /user did not work.
    – Syberdoor
    Jun 22, 2020 at 8:51
  • On my PC it never works but a co-worker has had some success. No idea why. Jun 22, 2020 at 18:38
  • I did this by adding CNAME records to my local DNS that point to the same network share. Thanks!
    – Jacob
    Aug 1, 2022 at 12:36
3

I was just trying to find an answer to this question and this answer gives the hint. All you need to do is add entries to the hosts file in %WINDIR%\system32\drivers\etc location. If you add w.x.y.z machinea and w.x.y.z machineb w.x.y.z machinec and so on (changing w.x.y.z to the ip address of the machine you wish to connect to of course) then you can connect to/map drives to \machinea\user1share \machineb\user2share \machinec\user3share and so on

This also allows you to map the same share more than once (not a good idea)

Thank you.

P.S. I am assuming a samba share was intended.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .