Connecting to multiple network shares on the same host using different credentials?
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.
Solution 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. 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.
Solution 2:
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.