Docker Community Forums

Share and learn in the Docker community.

Repeated credential prompt when enabling drive sharing

beta

(Andrew Weiss) #1

Expected behavior

When enabling drive sharing on C:, the credential prompt requests a username/password with administrative privileges on the machine.

Actual behavior

The credential prompt repeatedly requests credentials, even though the username/password combo has appropriate permissions on the machine.

Information

Windows 10 Enterprise Insider Preview 14316 (x64)
Docker for Windows v1.11.0-beta 7 (build: 1692)

Logs:

[14:31:01.351][SmbShare ][Info ] Sharing “C:” as “C”
[14:31:09.018][Auth ][Info ] Storing credentials: [hostname]\[user]:***********
[14:31:09.028][Auth ][Info ] Retrieved credentials: [hostname]\[user]:***********
[14:31:09.068][SmbShare ][Info ] Sharing “C:” as “C”
[14:31:09.073][SmbShare ][Info ] Creating share C
[14:31:09.200][SmbShare ][Info ] Testing connection to host filesystem
[14:31:16.601][Auth ][Info ] User cancelled auth prompt

Steps to reproduce the behavior

  1. Right-click Docker tray icon and select Settings
  2. Select the Managed shared volumes link
  3. Click the shared checkbox next to the C drive and click Apply
  4. Enter user name/password in credential dialog and click Ok
  5. Credential dialog continues to prompt over and over again without saving the settings and with no error indications

(Vincent De Smet) #2

I’m having the same issue right now, I’ve been playing with the credential store while trying to fix drive sharing issues. Have you tried going to Control Panel > Credential Manager > Windows Credentials and do you see the credentials for “Docker Host Filesystem Access” stored there?

If not, can you try to add them there yourself? Most likely you will get an error message. I’m about to reboot and hope that would solve my issue.


(Andrew Weiss) #3

Hey @so0k. Yea, so I checked the Credential Manager and noticed that no credentials were being stored. I also tried manually adding credentials for “Docker Host Filesystem Access” and still no luck…


(Vincent De Smet) #4

when you added the credentials manually, were they stored or did the Credential Manager report an error?

I’ve detailed the mounting process in my blog post, you may use it to understand better how it works and troubleshoot your issue http://docker-saigon.github.io/post/Docker-Beta/


(Andrew Weiss) #5

When I manually added the credentials, they were stored and no errors were reported.


(Rolf Neugebauer) #6

Hi

maybe a bit more details on what’s happening. When we share a drive we basically execute:
net share C=C:\ /grant:<username>,FULL /CACHE:None
and we then check if the share is mountable on the host by executing:
net use \\<machinename>\c /user:<username> <password> and then:
net use \\<machinename>\c /delete

The reason the popup keeps popping up us because the first net use command failed. Unfortunately, we currently don’t log the error code, so it would be great you could execute the command in an elevated shell and post any error. We will improve the error logging.

Also, @anweiss, the snipped from your logs say:
Storing credentials: [hostname]\[user]:***********
while mine say
Storing credentials: DESKTOP-P5BO8M0\rneugeba:***********
Did you edit the log by hand?

Thanks
Rolf


(Andrew Weiss) #7

Hey @rneugeba. So I am able to mount the share successfully using the same credentials that I have been using before. And yes, I purposely edited the log by hand to mask the creds in the post.


(Rolf Neugebauer) #8

Thanks for the confirmation re the logs.

Are you saying you can mount the share successfully on the command line with the commands I suggested but you still have an issue with being prompted repeatedly?


(Vincent De Smet) #9

Yes! I’m having the same issue

I have to make Docker Beta client think the credentials are fine by putting them in the credential store First because when it tests the credentials it keeps failing and prompting me for it - but they DO work! If I can trick it to accept “already existing” credentials, it works fine

I initially thought it was related to the fact that my machine is on a domain and I was using a local user for the file share and it kept failing when I put in %COMPUTERNAME%\user, but the issue is also there when using domain credentials.

when I get root on the VM (by mounting the docker socket and running a privileged container (also disabling security profiles) and mounting the host filesystem then chroot-ing to host fs - I’m able to mount -t cifs everything from the host myself, but the Docker Beta Client keeps failing… :frowning:

full details on my research here: http://docker-saigon.github.io/post/Docker-Beta/

it would help if you let me know which service monitors the hyperv pools so I can trouble shoot that as well (I haven’t been able to find any processes other than the hp_kv_daemon that had handles on the hyperv pools in the VM… I created a help topic about this before - but no answer.


(Vincent De Smet) #10

I obviously tried putting the actual computername and not the variable


(Jshannon) #11

I was experiencing this same issue. I could not get my credentials to be accepted, so I tried the command listed above and realized my password had a space in it so I had to quote it, which worked on the command line. I changed my password to not have a space in it and then retried to share my drive via Docker and it accepted my credentials.


(Andrew Weiss) #12

I’m still seeing this issue as of the current release (v1.11.1-beta11 build:2789). The only error message I see in the logs is:

Credentials challenge failed with time out

My machine is Azure AD-joined, but I am using a local user account that is a member of the local Administrators group for the volume sharing.

Any thoughts?


(Andrew Weiss) #13

Ok so I stumbled across another thread in the forum https://forums.docker.com/t/volume-mounts-in-windows-does-not-work/10693/25 and noticed some issues with passwords containing special characters. In my case, my password contained an “@”. Upon changing it to use no special characters, the drive sharing enabled with no issues.

Would still be nice to see a more specific error about this in the logs or provide support for passwords with special characters.


(Chenge) #14

I have the same issue on windows 10 redstone pre-release. Then I looked at another thread and found that the issue might because of me recent changing Microsoft account password. So I tried the old passcode and it worked. Sounds weird but so far it has been working.


(Chris Dostert) #15

My machine is also Azure AD-joined and I’m seeing the same issue


(Catbacker) #16

I am having the same issue. My setup is:

  • Windows 10
  • Using linked outlook.com account to login to Windows.
  • Account is not an administrator
  • logging in with xxxxxxx@outlook.com for user name
  • Running stable Docker for Windows 1.12.1 build 7135
  • Do not run Docker for Windows as administrator

When I do a fresh install, the first time I provide my credentials everything works as expected. I am able to mount the shared drive of C: and it works. After some period of time or if I have to reboot, when I run Docker for Windows again, credentials are not longer accepted and I get the infinite username/password prompt.

Very frustrating as the only solution I have found is to reinstall Docker for Windows. This does not seem to work the first time every time either. This means I have to rebuild my docker images again.