Is it possible to manually specify the username, in which Windows uses it when connecting to a networked share?
PS: Both the server and clients run Windows 7.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You can specify it through the command line using the net command.
net use <driveletter>: \\<server>\<sharename> /USER:<domain>\<username> <password> /PERSISTENT:YES
You can also specify different credentials using the Windows Explorer GUI. From the Tools menu select Map network drive.... On the Map Network Drive dialog window there is a checkbox for "Connect using different credentials".
Note: If you do not see the menu bar in Windows Explorer, press the ALT key to make it appear.
Yes, it is.
When you map the network share from Windows Explorer (right click on share name > Map network drive) you can use different user credentials:
You can also do it via command prompt (started as administrator):
net use [drive] [share] /user:[user] [password]
net use s: \\homesrv\share /user:vp pass123
To delete saved share usernames:
open cmd prompt type:
net use \\fileservername /del
net use * /del
to delete all
The comment to the top answer is a good solution, it does not require mapping network drive, just tries to access the directory with different user account and password, which meets my need. Quoting the comment to here :
...connect to a network share using separate credentials without mapping to a drive letter . . .:
net use \\<server>\<sharename> /USER:<domain>\<username> * Note that with this set of parameters, you must either specify the password or use the asterisk to signify that you want to be prompted...
I tried * and also replacing * with password, both worked well
I'll put a link to an answer which helped me perfectly. After I deleted all connections, Windows asked me for a username and a password again. Perfect!
Doing what the accepted answer says returned an error because I was already using the other shares somehow, even though all that was using them was closed. So the answer above removed all the connections completely and Windows was able to ask me for new credentials.
Note: you might want to run CMD as normal user and as administrator, as it seems I had connections on both outputs and were different, so I deleted them all (except one that couldn't be deleted, for some reason - but worked and I didn't have to reboot the computer).