Skip to content

Commit 5114a57

Browse files
authored
Merge pull request #224479 from khdownie/kendownie01192023
mounting file share to non domain joined VM
2 parents 9ec2026 + 04702a5 commit 5114a57

File tree

3 files changed

+60
-7
lines changed

3 files changed

+60
-7
lines changed

articles/storage/files/storage-files-identity-ad-ds-mount-file-share.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ author: khdownie
55
ms.service: storage
66
ms.subservice: files
77
ms.topic: how-to
8-
ms.date: 11/09/2022
8+
ms.date: 01/24/2023
99
ms.author: kendownie
1010
ms.custom: engagement-fy23
1111
recommendations: false
1212
---
1313

14-
# Mount a file share from a domain-joined VM
14+
# Mount an Azure file share
1515

1616
Before you begin this article, make sure you've read [configure directory and file-level permissions over SMB](storage-files-identity-ad-ds-configure-permissions.md).
1717

@@ -33,7 +33,7 @@ Before you can mount the Azure file share, make sure you've gone through the fol
3333
- If you're mounting the file share from a client that has previously connected to the file share using your storage account key, make sure that you've disconnected the share, removed the persistent credentials of the storage account key, and are currently using AD DS credentials for authentication. For instructions on how to remove cached credentials with storage account key and delete existing SMB connections before initializing new connection with Azure AD or AD credentials, follow the two-step process on the [FAQ page](./storage-files-faq.md#ad-ds--azure-ad-ds-authentication).
3434
- Your client must have line of sight to your AD DS. If your machine or VM is outside of the network managed by your AD DS, you'll need to enable VPN to reach AD DS for authentication.
3535

36-
## Mount the file share
36+
## Mount the file share from a domain-joined VM
3737

3838
Run the PowerShell script below or [use the Azure portal](storage-files-quick-create-use-windows.md#map-the-azure-file-share-to-a-windows-drive) to persistently mount the Azure file share and map it to drive Z: on Windows. If Z: is already in use, replace it with an available drive letter. The script will check to see if this storage account is accessible via TCP port 445, which is the port SMB uses. Remember to replace the placeholder values with your own values. For more information, see [Use an Azure file share with Windows](storage-how-to-use-files-windows.md).
3939

@@ -49,8 +49,37 @@ if ($connectTestResult.TcpTestSucceeded) {
4949
}
5050
```
5151

52+
You can also use the `net-use` command from a Windows prompt to mount the file share. Remember to replace `<YourStorageAccountName>` and `<FileShareName>` with your own values.
53+
54+
```
55+
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName>
56+
```
57+
5258
If you run into issues mounting with AD DS credentials, refer to [Unable to mount Azure Files with AD credentials](storage-troubleshoot-windows-file-connection-problems.md#unable-to-mount-azure-files-with-ad-credentials) for guidance.
5359

60+
## Mount the file share from a non-domain-joined VM
61+
62+
Non-domain-joined VMs can access Azure file shares if they have line-of-sight to the domain controllers. The user accessing the file share must have an identity and credentials in the AD domain.
63+
64+
To mount a file share from a non-domain-joined VM, the user must either:
65+
66+
- Provide explicit credentials such as **DOMAINNAME\username** where **DOMAINNAME** is the AD domain and **username** is the identity’s user name, or
67+
- Use the notation **username@domainFQDN**, where **domainFQDN** is the fully qualified domain name.
68+
69+
Using one of these approaches will allow the client to contact the domain controller to request and receive Kerberos tickets.
70+
71+
For example:
72+
73+
```
74+
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName> /user:<DOMAINNAME\username>
75+
```
76+
77+
or
78+
79+
```
80+
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName> /user:<username@domainFQDN>
81+
```
82+
5483
## Next steps
5584

5685
If the identity you created in AD DS to represent the storage account is in a domain or OU that enforces password rotation, you might need to [update the password of your storage account identity in AD DS](storage-files-identity-ad-ds-update-password.md).

articles/storage/files/storage-files-identity-auth-active-directory-enable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ To help you set up identity-based authentication for some common use cases, we p
4747
| [![Screencast of the replacing on-premises file servers video - click to play.](./media/storage-files-identity-auth-active-directory-enable/replace-on-prem-server-thumbnail.png)](https://www.youtube.com/watch?v=jd49W33DxkQ) | [![Screencast of the Using Azure Files as the profile container video - click to play.](./media/storage-files-identity-auth-active-directory-enable/files-ad-ds-fslogix-thumbnail.png)](https://www.youtube.com/watch?v=9S5A1IJqfOQ) |
4848

4949

50-
## Prerequisites
50+
## Prerequisites
5151

5252
Before you enable AD DS authentication for Azure file shares, make sure you've completed the following prerequisites:
5353

@@ -57,7 +57,7 @@ Before you enable AD DS authentication for Azure file shares, make sure you've c
5757

5858
- Domain-join an on-premises machine or an Azure VM to on-premises AD DS. For information about how to domain-join, refer to [Join a Computer to a Domain](/windows-server/identity/ad-fs/deployment/join-a-computer-to-a-domain).
5959

60-
If a machine isn't domain joined, you can still use AD DS for authentication if the machine has line of sight to the on-premises AD domain controller and the user types in their AD credentials.
60+
If a machine isn't domain joined, you can still use AD DS for authentication if the machine has line of sight to the on-premises AD domain controller and the user provides explicit credentials. For more information, see [Mount the file share from a non-domain-joined VM](storage-files-identity-ad-ds-mount-file-share.md#mount-the-file-share-from-a-non-domain-joined-vm).
6161

6262
- Select or create an Azure storage account. For optimal performance, we recommend that you deploy the storage account in the same region as the client from which you plan to access the share. Then, [mount the Azure file share](storage-how-to-use-files-windows.md) with your storage account key. Mounting with the storage account key verifies connectivity.
6363

includes/storage-files-aad-permissions-and-mounting.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
author: khdownie
66
ms.service: storage
77
ms.topic: include
8-
ms.date: 12/07/2022
8+
ms.date: 01/24/2023
99
ms.author: kendownie
1010
ms.custom: include file, devx-track-azurecli, devx-track-azurepowershell
1111
---
@@ -144,8 +144,32 @@ if ($connectTestResult.TcpTestSucceeded) {
144144
}
145145
```
146146

147+
You can also use the `net-use` command from a Windows prompt to mount the file share. Remember to replace `<YourStorageAccountName>` and `<FileShareName>` with your own values.
148+
149+
```
150+
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName>
151+
```
152+
147153
## Mount the file share from a non-domain-joined VM
148154

149155
Non-domain-joined VMs can access Azure file shares using Azure AD DS authentication only if the VM has line-of-sight to the domain controllers for Azure AD DS, which are located in Azure. This usually requires setting up a site-to-site or point-to-site VPN to allow this connectivity. The user accessing the file share must have an identity and credentials (an Azure AD identity synced from Azure AD to Azure AD DS) in the Azure AD DS managed domain.
150156

151-
When mounting the file share, the user must provide explicit credentials such as **DOMAINNAME\username** where DOMAINNAME is the Azure AD DS domain and username is the identity’s user name in Azure AD DS. This will help route Kerberos ticket requests from the client to the correct domain controller in the Azure AD DS domain.
157+
To mount a file share from a non-domain-joined VM, the user must either:
158+
159+
- Provide explicit credentials such as **DOMAINNAME\username** where **DOMAINNAME** is the Azure AD DS domain and **username** is the identity’s user name in Azure AD DS, or
160+
- Use the notation **username@domainFQDN**, where **domainFQDN** is the fully qualified domain name.
161+
162+
Using one of these approaches will allow the client to contact the domain controller in the Azure AD DS domain to request and receive Kerberos tickets.
163+
164+
For example:
165+
166+
```
167+
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName> /user:<DOMAINNAME\username>
168+
```
169+
170+
or
171+
172+
```
173+
net use Z: \\<YourStorageAccountName>.file.core.windows.net\<FileShareName> /user:<username@domainFQDN>
174+
```
175+

0 commit comments

Comments
 (0)