Open a network drive with different user

18,813

Solution 1

I've been using this:

net use "\\SERVER\SHARE" /D /Y
net use "\\SERVER\SHARE" /USER:"Username" "password"

If its a network mapped drive, lets say F:\, then use this:

net use F: /D /Y
net use F: "\\SERVER\SHARE" /USER:"Username" "password"

You can write this to some .bat file and run it to switch from one user to another. If you don't want to let your password written in the file, write * in the place of the password. It will then ask you to provide the password when you run the script.

Edit:

To make the ability to switch more reliable, I recommend you use the network share as mapped drive. It will enforce you ability to really disconnect from it when you want even if there are programs locking files and folders in the share at that moment.

If you are acessing files using \\server\share\ as path, sometimes you won't be able to effectively disconnect from it for mysterious reasons, even if the entry disappear from the net use list.

You problably already had a Pen Drive that refused to "safely disconnect" even though you closed all windows. Its the same deal here, but in this case there is no plug to pull out.

Solution 2

I want to use a router's USB drive as a network storage for different users, as the statements of this thread the Windows cannot connect different user's share folders simultaneously in one user session of a PC, it shows the error message

"Multiple Connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again."

and as the above answers, we can use the "NET USE" command to clear the current connections and connect another user's share folder, but this method still can open only one connect in the same time.

I found another way from the webpage

http://backupchain.com/i/how-to-fix-error-1219-multiple-connections-to-a-server-or-shared-resource-by-the-same-user

It says that the Windows connection limitation can be solved by editing the hosts file which is under the directory "C:\Windows\System32\Drivers\etc".

For example, my router IP address is 192.168.1.1 and its USB drive has three share folders as \user1, \user2 and \user3 which separated for three users, then we can add the following three lines in hosts file,

192.168.1.1 server1

192.168.1.1 server2

192.168.1.1 server3

in this example we map the server1 to user #1, server2 to user #2 and server3 to user #3.

After reboot the PC, we can connect the folder \user1 for user #1, \user2 for user #2 and \user3 for user #3 simultaneously in Windows File Explorer, that is

if we type the router name as \\server1 in folder indication field of Explorer, it will show all shared folders of router's USB drive in Explorer right pane and sever1 under "Network" item in left pane of Explorer, then the user #1 may access the share folder \user1.

At this time if we type \\server2 or \\server3 in the directory indication field of Explorer, then we may connect the router's USB drive as server2 or server3 and access the share folder \user2 or \user3 for user #2 or user #3 and keep the "server1" connection simultaneously.

Using this method we may also use the "NET USE" command to do these actions.

Share:
18,813

Related videos on Youtube

Starx
Author by

Starx

A Nobody, Trying to be Somebody

Updated on September 18, 2022

Comments

  • Starx
    Starx over 1 year

    Normally, after we open a network drive using one authentication, its hard to change the user that it used to open that drive to another one.

    I basically have to use credential manager for this task.

    Any other easy way?

    • Rinat Hatipov
      Rinat Hatipov about 11 years
      At the command line you can run net use * /d /y - that'll cause Windows to forget any cached credentials you have to an open network share. I typically have a shortcut that points to cmd.exe with -k net use * /d /y as arguments for this very reason.
    • Starx
      Starx about 11 years
      @vcsjones, Didn't work.
  • Havenard
    Havenard about 11 years
    Okay, in the case you are connected to more than one share in the same server, you will have to remove them all before connecting with different credentials. You can use net use * /D /Y to disconnect from all network shares.
  • Mark Allen
    Mark Allen about 11 years
    You can run NET USE from the command prompt to see your current connections.
  • Starx
    Starx about 11 years
    I did still gives the same output.
  • Havenard
    Havenard about 11 years
    Check the edit part on my post, maybe thats your case.
  • Starx
    Starx about 11 years
    I tried just now making network drives, didn't work either. And I have no pendrives or other things connected.
  • Havenard
    Havenard about 11 years
    If you are locked to the network share, you will have to reboot to do further testing. And in order to the mapped drive solution work, it is important that you never access the network share directly from outside the mapped drive, otherwise you ruin the propose of using it.
  • Trisped
    Trisped about 9 years