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 · 14 comments
Closed

Comments

@hansmbakker
Copy link

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
Copy link
Contributor

rn 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
Copy link
Member

dgageot 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
Copy link
Contributor

rn commented Sep 28, 2016

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

@hansmbakker
Copy link
Author

hansmbakker 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
Copy link
Member

dgageot 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
Copy link

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
Copy link
Member

dgageot commented Oct 18, 2016

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

@hansmbakker
Copy link
Author

@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
Copy link

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
Copy link

friism commented Oct 24, 2016

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

@rn
Copy link
Contributor

rn commented Nov 15, 2016

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

@londoncalling
Copy link

londoncalling 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
Copy link

joubin 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?

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants