Is it possible to manually specify the username, in which Windows uses it when connecting to a networked share?
perhaps \\username@host\...
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 communityYou 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.
net use
, if you enter *
for the password, it will prompt you for it.
Jul 28, 2017 at 4:49
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 (which I do).
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]
Example:
net use s: \\homesrv\share /user:vp pass123
net use s: \\homesrv\share /user:vp pass123
Jun 18, 2018 at 9:01
To delete saved share usernames:
open cmd prompt type:
net use \\fileservername /del
ornet 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!
https://serverfault.com/a/309338/547024
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).
net use Z: \192.168.1.2:8080\DavWWWRoot /user:admin pass123 /persistent:yes