12

Domain Controller OS: Windows Server 2008 R2
Client OS: Windows XP, Windows 7

  • Windows XP client name: Client1
  • Windows XP client name: Client2

I had login as abc.local\Q2020 on Client1 and accessing other Client2 shared folder via Start > Run > \\Client2

By defualt it is taking the Credential of the user which I have login i.e abc.local\Q2020, while accessing the shared folder on Client2.

I want that it must ask me a credential, so that i can give credential of different User, which has the rights of shared folder on Client2

Can you guide me - how can i give credential of different domain user while i am logged as abc.local\Q2020?

Eddie C.
  • 487
  • 1
  • 3
  • 12
Param
  • 1,347
  • 13
  • 34
  • 51

3 Answers3

17

Map a network drive to that network path and choose the option to use a different username and password.

Chris McKeown
  • 7,128
  • 1
  • 17
  • 25
11

from the CLI: net use * \\server\share password /user:domain\user

note the * will use the next available drive letter. If you prefer to use a specific driver letter, replace * with X:

Also note that you cannot simultaneously make two connections to a single server using two different user accounts. Type net use at the command prompt to see what connections are already open then net use \\server\share /delete to remove them before mapping the new drive.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
Paul Ackerman
  • 2,729
  • 15
  • 23
  • 3
    You can also use * instead of the password parameter. This will prompt you to type in the password in a prompt that does not echo the characters. This keeps you from having to type your password in plaintext. – MDMarra Jul 06 '12 at 14:35
  • 2
    It's actually possible to connect to the same share using different accounts by using the FQDN and the IP address - Windows treats them as separate connections. So you could connect to \\Server1\Share, \\Server1.domain.com\Share and \\192.168.0.1\Share using three different sets of credentials. – Chris McKeown Jul 06 '12 at 14:38
  • @ChrisMcKeown - good one. I had forgotten about that. – Paul Ackerman Jul 09 '12 at 01:21
  • @MDMarra, the danger of using \\server\share * to get prompted for password is that when you open Windows Explorer and begin typing the first few letters of the path... it shows the password in plaintext in the autocomplete dropdown for anyone looking at your screen to see. Security failure on Microsoft's part. (Tested using Win7 SP1 with latest hotfixes as of Mar-14-2013). – Lee Grissom Mar 14 '13 at 23:29
  • @LeeGrissom The * in this example isn't to be prompted for the password. – MDMarra Mar 15 '13 at 00:30
  • @MDMarra, I think there's some confusion. I was referring only to your comment dated "Jul 6 '12", not the answer by Paul. Using your suggestion, while the password will be masked in the CLI, it will appear in cleartext when navigating to the shared location via Windows Explorer. – Lee Grissom Mar 15 '13 at 18:28
-1

The connection to the share must be deleted. You can either logout and back in, or follow one of the Net Use procedures below without having to logout.

To delete all connections to a particular server, from Command Prompt type

 Net Use \\\servername /delete

replacing servername with the name or IP address of the computer or server.

To delete a connection to a specific share, from Command Prompt type "

 Net Use \\\servername\sharename /delete

replacing servername with the name or IP address of the computer or server and sharename with the name of the share.

  • 1
    Completely wrong! `net user ...` is for users, not shares. `net use \\server\share /delete` (with 2 backslashes, not 3!) or `net use * /delete` works to remove share mappings. But anyway, it may not be enough to remove stored credentials. – mivk Apr 11 '17 at 13:47