Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local security policy prevents sharing drive in Docker for Windows #98

Closed
hansmbakker opened this issue Sep 23, 2016 · 13 comments

Comments

@hansmbakker
Copy link

commented Sep 23, 2016

Expected behavior

Docker can mount shared drives.

Actual behavior

Docker cannot mount shared drives because a local security policy prevents the command "net use":
net use \\<machinename>\c /user:<username> <password>

The security policy is "Access this computer from the network". This policy is restricted by my company to only specific usernames and therefore I cannot modify it (even though I am a local administrator).

When trying to share the drives using the Docker Settings GUI, the credentials dialog keeps popping up even though the specified credentials are valid and the user does have access rights to the complete disk.

Output:

PS C:\WINDOWS\system32> net share C=C:\ /grant:<domain>\<username>,FULL /CACHE:None
C was shared successfully.

PS C:\WINDOWS\system32> net use \\<computername>\c /user:<domain>\<username> <password>
System error 1385 has occurred.

Logon failure: the user has not been granted the requested logon type at this computer.

Information

  • Diagnostic ID: 599EC82B-AF34-41B4-AE3E-219FD54886DF/2016-09-23_10-03-39
  • host distribution and version: Windows 10 Enterprise 10.0.10586
  • docker 1.12.1-beta26

Steps to reproduce the behavior

  1. Restrict the "Access this computer from the network"
  2. Try to use the Shared Drives panel in the Docker for Windows Settings app.

@rn rn added the area/volumes label Sep 23, 2016

@rn

This comment has been minimized.

Copy link
Contributor

commented Sep 23, 2016

@wind-rider thank you for the detailed report. Unfortunately we rely on CIFS for shared volumes. Do you have a suggestion which would work in your environment?

@dgageot

This comment has been minimized.

Copy link

commented Sep 23, 2016

@wind-rider @rneugeba next beta of Docker for Windows (maybe next week) does not rely on "net use" anymore. I hope it will help!

@rn rn added the fixed-in/beta27 label Sep 26, 2016

@rn

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2016

@wind-rider bet27 shipped a couple of hours ago. It would be great if you could retry

@hansmbakker

This comment has been minimized.

Copy link
Author

commented Sep 29, 2016

@dgageot @rneugeba thanks for the hint!

Unfortunately beta 27 still doesn't work, in the logs there is a different error now. I couldn't get from the log info what was wrong this time, though..

I uploaded a new diagnostic with id 599EC82B-AF34-41B4-AE3E-219FD54886DF/2016-09-29_20-03-03

@dgageot

This comment has been minimized.

Copy link

commented Sep 29, 2016

Copying the error here for the record:

[19:53:26.900][SambaShare     ][Error  ] Unable to mount C drive: mount error(5): I/O error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount: mounting //10.0.75.1/C on /c failed: Invalid argument
@andythorne

This comment has been minimized.

Copy link

commented Oct 4, 2016

Same error for me since beta 27:

[09:57:57.013][SambaShare     ][Error  ] Unable to mount C drive: mount error(5): I/O error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount: mounting //10.0.75.1/C on /c failed: Invalid argument

@dgageot dgageot added the area/mounts label Oct 4, 2016

@dgageot

This comment has been minimized.

Copy link

commented Oct 18, 2016

@andythorne @wind-rider We added more fixed to Beta28. Could you try it?

@hansmbakker

This comment has been minimized.

Copy link
Author

commented Oct 22, 2016

@dgageot unfortunately using beta28 doesn't help either.

After trying to share my C-drive and clicking 'Apply' it asks for my credentials, tries for some time and then returns the GUI to the initial state - the C drive without a checkmark in front of it.

Please find the updated diagnostics with id: 599EC82B-AF34-41B4-AE3E-219FD54886DF/2016-10-22_19-43-42

@simonferquel

This comment has been minimized.

Copy link

commented Oct 24, 2016

This policy is quite self-explanatory and it is blocking remote File Sharing. D4W uses remote file Sharing (the Linux VM connects to the Samba port on the Windows host) to enable mounting Windows folders. If your administrators forbid remote file sharing (that is what does the policy), there is unfortunately nothing we can do to make it work.

@friism

This comment has been minimized.

Copy link

commented Oct 24, 2016

We should probably add this to the FAQ... cc @londoncalling

@rn

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2016

closing due to inactivity. Please re-open if the this is still an issue if there is additional information

@londoncalling

This comment has been minimized.

Copy link

commented Nov 18, 2016

See PR 648 on docker.github.io for docs updates to address this in troubleshooting for Docker for Windows docs.

@joubin

This comment has been minimized.

Copy link

commented Mar 26, 2019

What happened to this thread? @dgageot the build I downloaded today (Docker for Windows) from Docker Hub still uses net share. Am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.