Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been tearing my hair out trying to get Windows to remember the credentials to a network share, and almost all attempts were completely fruitless.

I have two Windows machines, one being a media center that is supposed to access content on the other, but every time it fails to remember the credentials and requires a manual login to the remote share to get things going.

I tried various thing. Adding the credentials to Credential Manager, trying to change the NTLP security level, changing the username/passwords of the two machines to match, and I'm sure I tried other things too, nothing worked.

share|improve this question

3 Answers 3

This problem seems to stem from Windows attempting the initial connection to a networked drive using the its host's domain (the "Current Domain" in the picture) instead of the network server's domain (the "Desired Domain" in the picture).

For the following example let us assume the username of a user who is authorized to access the network drive is "SomeUsername". If I entered "SomeUsername" into the username field of the box below and then also entered the correct password Windows would connect to the network drive, but when I restated my computer Windows would not remember the username and password, even if I had checked the "Remember my credentials" box. The solution is to change the domain you enter your credentials. As noted in the picture you will need to type "\{DOMAIN}\{USERNAME}" in the username field without entering a password then click OK. For this example I would enter \FREENAS\SomeUsername into the username field, leave the password field blank, then click OK.

enter image description here

After you do that you will get a new pop up that looks like the one below. Enter the correct password, check the "Remember my credentials" box, then click OK. The next time you restart Windows your network drive should reconnect.

enter image description here

One side note, the part where you leave your password blank isn't really necessary, but leaving the password blank as suggested will allow you to clearly see what domain name Windows is going to store with the credentials you enter.

share|improve this answer
    
+1 Really cool - that worked for me! –  Olaf Apr 11 at 10:12

I eventually managed to come up with something that worked!

You need to automatically authenticate to the share each time the machine is started, which can be done with a batch script.

This is what you need in your script:

net use \\theremotemachine ThePassword /user:Username

Based on info from here and here.

Now, I didn't have any luck getting this working using task scheduler for some reason, so I ended up using a program called hstart. It allows you to launch hidden batch scripts.

I created a shorcut, put it in the Startup folder, and changed the Target to:

C:\hstart.exe /NOCONSOLE “C:\script.bat”

And there you go, there should now be no problems accessing the shared folders on the remote machine.

I think there may be a problem if the other machine isn't on when the script runs, but I'm not sure how you could get around that..

Hope someone else finds this useful.

share|improve this answer
    
You can also add /persistent:yes at the end of your net use command. –  jftuga Jul 12 '11 at 12:51
    
I tried that and it would still forget the credentials :( –  Acorn Jul 12 '11 at 13:18
    
There will be an event under the Event Viewer I would check there. –  surfasb Jul 12 '11 at 22:05
1  
-1 @Acorn, this is not a good solution. While it probably is solving your connection problem it is a really bad idea to store password in clear text. See my answer to make sure you have entered the correct domain for your credentials. –  ubiquibacon Jul 6 '13 at 4:40

Use NET USE with \savecred and \persistent:yes to permanently save the credentials

net use \\Hostname /savecred /persistent:yes

share|improve this answer
    
I tried that and had no luck, hence the last resort of authenticating at startup. I assume your solution should work when Windows isn't being evil, so +1 –  Acorn Jul 12 '11 at 13:22
    
what output/error message you got ? –  Revolter Jul 12 '11 at 13:26
    
There's no error message, just after rebooting the credentials are not remembered and you need authenticate again. –  Acorn Jul 12 '11 at 15:00
    
This answer is not saying anything wrong. It does not solve the problem either. –  krawyoti Oct 25 '13 at 15:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.