You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/files/storage-files-identity-auth-linux-kerberos-enable.md
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Use Kerberos Authentication for Linux clients with Azure Files
2
+
title: Use Kerberos Authentication for Linux Clients with Azure Files
3
3
description: Learn how to enable identity-based Kerberos authentication for Linux clients over Server Message Block (SMB) for Azure Files using on-premises Active Directory Domain Services (AD DS) or Microsoft Entra Domain Services.
4
4
author: khdownie
5
5
ms.service: azure-file-storage
@@ -32,7 +32,7 @@ You can't use identity-based authentication to mount Azure File shares on Linux
32
32
33
33
## Prerequisites
34
34
35
-
Before you enable AD authentication over SMB for Azure file shares, make sure you complete the following prerequisites.
35
+
Before you enable Active Directory authentication over SMB for Azure file shares, make sure you complete the following prerequisites.
36
36
37
37
- A Linux VM running Ubuntu 18.04+, or an equivalent RHEL or SLES VM. If running on Azure, the VM must have at least one network interface on the virtual network containing Microsoft Entra Domain Services. If using an on-premises VM, your AD DS must be synced to Microsoft Entra ID.
38
38
- Root user or user credentials to a local user account that has full sudo rights (for this guide, localadmin).
@@ -116,9 +116,9 @@ MulticastDNS setting: no
116
116
DNS Domain: domain1.contoso.com
117
117
```
118
118
119
-
1. If the command works, skip the following steps and proceed to the next section.
119
+
2. If the command works, skip the following steps and proceed to the next section.
120
120
121
-
1. If the command doesn't work, make sure that you can ping the domain server IP addresses.
121
+
3. If the command doesn't work, make sure that you can ping the domain server IP addresses.
1. If the ping doesn't work, go back to [prerequisites](#prerequisites), and make sure that your VM is on a VNET that has access to the Entra tenant.
139
+
4. If the ping doesn't work, go back to [prerequisites](#prerequisites), and make sure that your VM is on a virtual network that has access to the Entra tenant.
140
140
141
-
1. If the IP addresses respond to ping but the DNS servers aren't automatically discovered, you can add the DNS servers manually. Edit `/etc/netplan/50-cloud-init.yaml` by using your favorite text editor.
141
+
5. If the IP addresses respond to ping but the DNS servers aren't automatically discovered, you can add the DNS servers manually. Edit `/etc/netplan/50-cloud-init.yaml` by using your favorite text editor.
142
142
143
143
```plaintext
144
144
# This file is generated from information provided by the datasource. Changes
@@ -167,7 +167,7 @@ Then apply the changes:
167
167
sudo netplan --debug apply
168
168
```
169
169
170
-
1. Winbind assumes that the DHCP server keeps the domain DNS records up-to-date. However, this assumption isn't true for Azure DHCP. To set up the client to make DDNS updates, use [this guide](../../virtual-network/virtual-networks-name-resolution-ddns.md#linux-clients) to create a network script. Here's a sample script that resides at `/etc/dhcp/dhclient-exit-hooks.d/ddns-update`.
170
+
6. Winbind assumes that the DHCP server keeps the domain DNS records up-to-date. However, this assumption isn't true for Azure DHCP. To set up the client to make DDNS updates, use [this guide](../../virtual-network/virtual-networks-name-resolution-ddns.md#linux-clients) to create a network script. Here's a sample script that resides at `/etc/dhcp/dhclient-exit-hooks.d/ddns-update`.
171
171
172
172
```plaintext
173
173
#!/bin/sh
@@ -196,7 +196,7 @@ fi
196
196
197
197
### Connect to Microsoft Entra Domain Services and make sure the services are discoverable
198
198
199
-
1.Make sure that you can ping the domain server by the domain name.
199
+
Make sure that you can ping the domain server by the domain name.
### Set up hostname and fully qualified domain name (FQDN)
238
238
239
-
1.Using your text editor, update the `/etc/hosts` file with the final FQDN (after joining the domain) and the alias for the host. The IP address doesn't matter for now because this line is mainly used to translate short hostname to FQDN. For more information, see [Setting up Samba as a Domain Member](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member).
239
+
Using your text editor, update the `/etc/hosts` file with the final FQDN (after joining the domain) and the alias for the host. The IP address doesn't matter for now because this line is mainly used to translate short hostname to FQDN. For more information, see [Setting up Samba as a Domain Member](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member).
1.Configure `/etc/krb5.conf` so that the Kerberos key distribution center (KDC) with the domain server can be contacted for authentication. For more information, see [MIT Kerberos Documentation](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html). Here's a sample `/etc/krb5.conf` file.
280
+
Configure `/etc/krb5.conf` so that the Kerberos key distribution center (KDC) with the domain server can be contacted for authentication. For more information, see [MIT Kerberos Documentation](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html). Here's a sample `/etc/krb5.conf` file.
1.Change the SMB configuration to act as a domain member. For more information, see [Setting up samba as a domain member](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member). Here's a sample `smb.conf` file.
301
+
Change the SMB configuration to act as a domain member. For more information, see [Setting up samba as a domain member](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member). Here's a sample `smb.conf` file.
302
302
303
303
> [!NOTE]
304
304
> This example is for Microsoft Entra Domain Services, for which setting `backend = rid` is recommended when configuring idmap. On-premises AD DS users might prefer to [choose a different idmap backend](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member#Choosing_an_idmap_backend).
1.Force winbind to reload the changed config file.
340
+
Force winbind to reload the changed config file.
341
341
342
342
```bash
343
343
sudo smbcontrol all reload-config
344
344
```
345
345
346
346
### Join the domain
347
347
348
-
1.Use the `net ads join` command to join the host to the Microsoft Entra Domain Services domain. If the command returns an error, see [Troubleshooting samba domain members](https://wiki.samba.org/index.php/Troubleshooting_Samba_Domain_Members) to resolve the problem.
348
+
Use the `net ads join` command to join the host to the Microsoft Entra Domain Services domain. If the command returns an error, see [Troubleshooting samba domain members](https://wiki.samba.org/index.php/Troubleshooting_Samba_Domain_Members) to resolve the problem.
349
349
350
350
```bash
351
351
sudo net ads join -U contososmbadmin # user - garead
@@ -358,7 +358,7 @@ Using short domain name -- CONTOSODOMAIN
358
358
Joined 'CONTOSOVM' to dns domain 'contosodomain.contoso.com'
359
359
```
360
360
361
-
1. Make sure that the DNS record exists for this host on the domain server.
361
+
Make sure that the DNS record exists for this host on the domain server.
@@ -376,14 +376,14 @@ If you plan for users to actively sign in to client machines and access the Azur
376
376
377
377
### Set up nsswitch.conf
378
378
379
-
1. After you join the host to the domain, add the winbind libraries to the user and group lookup paths. Use your text editor to edit `/etc/nsswitch.conf` and add the following entries:
379
+
After you join the host to the domain, add the winbind libraries to the user and group lookup paths. Use your text editor to edit `/etc/nsswitch.conf` and add the following entries:
380
380
381
381
```plaintext
382
382
passwd: compat systemd winbind
383
383
group: compat systemd winbind
384
384
```
385
385
386
-
1. Enable the winbind service to start automatically on reboot.
386
+
Enable the winbind service to start automatically on reboot.
387
387
388
388
```bash
389
389
sudo systemctl enable winbind
@@ -394,7 +394,7 @@ Synchronizing state of winbind.service with SysV service script with /lib/system
Apr 24 09:34:31 contosovm winbindd[27349]: STATUS=daemon 'winbindd' finished starting up and ready to serve connections
424
424
```
425
425
426
-
1. Make sure that the domain users and groups are discovered.
426
+
Make sure that the domain users and groups are discovered.
427
427
428
428
```bash
429
429
getent passwd contososmbadmin
@@ -449,14 +449,14 @@ wbinfo --ping-dc
449
449
450
450
### Configure PAM for winbind
451
451
452
-
1. Place winbind in the authentication stack so that domain users authenticate through winbind by configuring PAM (Pluggable Authentication Module) for winbind. The second command ensures that the system creates the home directory for a domain user upon first login.
452
+
Place winbind in the authentication stack so that domain users authenticate through winbind by configuring PAM (Pluggable Authentication Module) for winbind. The second command ensures that the system creates the home directory for a domain user upon first login.
453
453
454
454
```bash
455
455
sudo pam-auth-update --enable winbind
456
456
sudo pam-auth-update --enable mkhomedir
457
457
```
458
458
459
-
1. Ensure that the PAM authentication config has the following arguments in`/etc/pam.d/common-auth`:
459
+
Ensure that the PAM authentication config has the following arguments in`/etc/pam.d/common-auth`:
0 commit comments