33

By default when I access some computer's share ( typing \\hostname in Windows Explorer ) Windows passes credential of my current user. It prompts for credentials only when current user's credentials are incorrect.

Is there some way to force Windows not to pass current user's credentails, but prompt for them ? I thought about making use of net view command, but it doesn't grab 'user' and 'password' parameters.

0

3 Answers 3

39

if you type the command

net use \\SERVERNAME /u:DOMAIN\USER 

you will be prompted for the password of that user to be used when accessing that server

26

If the accepted answer gives you this error;

System error 1219 has occurred.

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.

You'll need to first remove the existing shares. If you're in a hurry, this will nuke all of them, regardless of server;

NET USE * /DELETE

If, you want to be a bit more precise and preserve your other shares, use the following command to list the existing shares on the server;

NET VIEW \\SERVERNAME

Then delete the conflicting share with;

NET USE \\SERVERNAME\SHARENAME /DELETE

Finally, using the accepted answer will succeed;

NET USE \\SERVERNAME\SHARENAME /u:USERNAME
Enter the password for 'USERNAME' to connect to 'SERVERNAME':
The command completed successfully.
4
  • 2
    This was perfect, and the problem was quite annoying, so thank you very much! Aug 4, 2016 at 17:05
  • Make sure you have no Windows Explorer windows open at the share too otherwise NET USE \\SERVERNAME\SHARENAME /u:USERNAME keeps giving the System error 1219 Jul 12, 2018 at 5:42
  • 1
    Thanks Shawn, this did the trick for me.
    – Kev
    Mar 20, 2019 at 17:04
  • This steps fix my problem until I restart. When rebooting I have to performs these steps again, is there any permanent solution? Aug 26, 2020 at 17:45
0

Remember that this must be typed at the command prompt (CMD) opened with administrator permission, or in Windows powershell also with administrator permission.

Once this is done you can use run (winkey + r) and enter the address you want to access (\serverName\shareName).

You must log in to answer this question.

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