Can someone point me in a direction what else I can try?

If you try to mount a CIFS share on windows 2008 R2 server, the system still prompt for credentials even if you type them correctly.

Furthermore, if you try using shell command net use, you get the following error:

C:\Users\Admini>NET USE R: \\10.0.0.1\share /user:admin password
System error 86 has occurred.
The specified network password is not correct.

To resolve this issue:

  1. go to start > run
  2. type secpol.msc.
  3. Local Policies -> Security Options
  4. Change the value of "Network Security: LAN Manager authentication level" to: LM and NTLM – use NTLMv2 session security if negotiated

enter image description here

Source If you try to mount a share on windows 2008 R2 server the system still prompt for credential even if you type them correctly


I have not figured out what is wrong with the command but I have found a workaround:
It turns out that it is possible to connect network drives within the file explorer too, without using the command line.

This is how it is done:

  1. In a file explorer window write the address of the network resource with a double backslash
    enter image description here

When the authentication window appears, choose save credentials

  1. Then right-click on the folder you want to connect and choose

Map network drive...

  1. In the popup window make sure to choose Reconnect at sign-in: enter image description here

This way the network folder will be automatically added when the user logs in. No need to run the script upon login.