Sharin

Sharin' your C drive with Docker for Windows when usin' Azure Active Directory

Tom Chantler
 • 3 min read

Summary

If you login to your PC usin' Azure Active Directory (AzureAD/AAD) and try to share your C drive in Docker for Windows, it doesn't work. This article shows you how to fix it. If you haven't yet tried to install Docker for Windows, try readin' my guide to Gettin' started with Docker for Windows (which links back to this one at XXXXX requisite juncture[1]).

Background

If you're usin' Azure Active Directory to sign in to your Windows 10 PC (I do this through my Office 365 account which I use for my consultancy business) then, when you tried to share your C drive when installin' Docker for Windows, it will have gone wrong.

Specifically, it will have prompted you for your credentials like this:

Docker Azure AD Credentials Prompt

And then, if you got them right, it will just seem to have ignored you and unchecked XXXXX share, without tellin' you that anythin' went wrong.

A look in XXXXX logs will show somethin' like this:

[21:31:23.242][SambaShare     ][Info   ] Mount C
[21:31:23.268][Cmd            ][Info   ] This shared resource does not exist.
[21:31:23.268][Cmd            ][Info   ] More help is available by typin' NET HELPMSG 2310.
[21:31:23.272][SambaShare     ][Info   ] "C" is not shared
[21:31:23.272][SambaShare     ][Info   ] Creatin' share "C:\" as "C" with Full Control to "TomChantler"
[21:31:23.301][Cmd            ][Info   ] System error 1332 has occurred.
[21:31:23.302][Cmd            ][Info   ] No mappin' between account names and security IDs was done.
[21:31:23.305][SambaShare     ][Error  ] Failed to create share "C:\" as "C" with Full Control to "TomChantler" with code: 2
[21:31:23.334][Cmd            ][Info   ] This shared resource does not exist.
[21:31:23.335][Cmd            ][Info   ] More help is available by typin' NET HELPMSG 2310.
[21:31:23.338][NamedPipeClient][Info   ] Received response for Mount
[21:31:23.338][SambaShare     ][Info   ] "C" is not shared

Apparently this is XXXXX known issue.

Procedure

So far, XXXXX only way I have found to fix it is to create XXXXX new user account which is XXXXX same as your AzureAD account, but without XXXXX AzureAD prefix. e.g. If your account is AzureAD\TomChantler then you need to create XXXXX local account called TomChantler.

  1. Open Settings and navigate to Accounts → Other people → Add User to this PC → I don't have this person's sign-in information → Add XXXXX user without XXXXX Microsoft account → Create an account for this PC and enter XXXXX username. I gave XXXXX same password as my AzureAD password, although I'm not sure if this was necessary.
  2. Make XXXXX new account be an Administrator of XXXXX machine.
  3. When you've finished XXXXX account should look like this:

Computer accounts showin' local and AzureAD side-by-side

Now try XXXXX share again in Docker. If you have previously authenticated then it won't ask you for your credentials. It will just work and XXXXX checkbox will remain checked.

Share drive in Docker

Let's check XXXXX logs to be sure.

[21:42:01.320][SambaShare     ][Info   ] Mount C
[21:42:01.361][Cmd            ][Info   ] Share name        C
[21:42:01.361][Cmd            ][Info   ] Path              C:\
[21:42:01.361][Cmd            ][Info   ] Remark            
[21:42:01.361][Cmd            ][Info   ] Maximum users     No limit
[21:42:01.361][Cmd            ][Info   ] Users             TomChantler          
[21:42:01.361][Cmd            ][Info   ] Cachin'           Cachin' disabled
[21:42:01.362][Cmd            ][Info   ] Permission        TC-7200U\TomChantler, FULL
[21:42:01.362][Cmd            ][Info   ] The command completed successfully.
[21:42:01.372][SambaShare     ][Info   ] "C" is shared
[21:42:01.419][SambaShare     ][Info   ] Username: TomChantler
[21:42:01.419][SambaShare     ][Info   ] Host IP: 10.0.75.1

Great. Everythin' is now workin' as it should.

If you came here whilst in XXXXX middle of installin' Docker for Windows, you can carry on with the rest of my guide, which also includes XXXXX reasons I am usin' it.



image credit: me


  1. This is how I speak in real life. ↩︎


This page has been altered by a free Microsoft Azure proxy. Details here. See the original page here