Skip to content

Commit 2858da9

Browse files
committed
[AzureADDS] Updates to CoreOS domain-join
1 parent e925a06 commit 2858da9

File tree

3 files changed

+91
-71
lines changed

3 files changed

+91
-71
lines changed

articles/active-directory-domain-services/join-centos-linux-vm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ sudo yum install realmd sssd krb5-workstation krb5-libs oddjob oddjob-mkhomedir
8080

8181
## Join VM to the managed domain
8282

83-
Now that the required packages are installed on the VM and NTP is configured, join the VM to the Azure AD DS managed domain.
83+
Now that the required packages are installed on the VM, join the VM to the Azure AD DS managed domain.
8484

8585
1. Use the `realm discover` command to discover the Azure AD DS managed domain. The following example discovers the realm *CONTOSO.COM*. Specify your own Azure AD DS managed domain name in ALL UPPERCASE:
8686

Lines changed: 89 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,91 @@
11
---
2-
title: 'Azure Active Directory Domain Services: Join a CoreOS Linux VM | Microsoft Docs'
3-
description: Join a CoreOS Linux virtual machine to Azure AD Domain Services
2+
title: Join a CoreOS VM to Azure AD Domain Services | Microsoft Docs'
3+
description: Learn how to configure and join a CoreOS virtual machine to an Azure AD Domain Services managed domain.
44
services: active-directory-ds
5-
documentationcenter: ''
65
author: iainfoulds
76
manager: daveba
8-
editor: curtand
97

108
ms.assetid: 5db65f30-bf69-4ea3-9ea5-add1db83fdb8
119
ms.service: active-directory
1210
ms.subservice: domain-services
1311
ms.workload: identity
14-
ms.tgt_pltfrm: na
15-
ms.devlang: na
1612
ms.topic: conceptual
17-
ms.date: 05/20/2019
13+
ms.date: 09/14/2019
1814
ms.author: iainfou
1915

2016
---
21-
# Join a CoreOS Linux virtual machine to a managed domain
22-
This article shows you how to join a CoreOS Linux virtual machine in Azure to an Azure AD Domain Services managed domain.
17+
# Join a CoreOS virtual machine to an Azure AD Domain Services managed domain
2318

24-
[!INCLUDE [active-directory-ds-prerequisites.md](../../includes/active-directory-ds-prerequisites.md)]
19+
To let users sign in to virtual machines (VMs) in Azure using a single set of credentials, you can join VMs to an Azure Active Directory Domain Services (AD DS) managed domain. When you join a VM to an Azure AD DS managed domain, user accounts and credentials from the domain can be used to sign in and manage servers. Group memberships from the Azure AD DS managed domain are also applied to let you control access to files or services on the VM.
2520

26-
## Before you begin
27-
To perform the tasks listed in this article, you need:
28-
1. A valid **Azure subscription**.
29-
2. An **Azure AD directory** - either synchronized with an on-premises directory or a cloud-only directory.
30-
3. **Azure AD Domain Services** must be enabled for the Azure AD directory. If you haven't done so, follow all the tasks outlined in the [Getting Started guide](tutorial-create-instance.md).
31-
4. Ensure that you have configured the IP addresses of the managed domain as the DNS servers for the virtual network. For more information, see [how to update DNS settings for the Azure virtual network](tutorial-create-instance.md#update-dns-settings-for-the-azure-virtual-network)
32-
5. Complete the steps required to [synchronize passwords to your Azure AD Domain Services managed domain](tutorial-create-instance.md#enable-user-accounts-for-azure-ad-ds).
21+
This article shows you how to join a CoreOS VM to an Azure AD DS managed domain.
3322

23+
## Prerequisites
24+
25+
To complete this tutorial, you need the following resources and privileges:
26+
27+
* An active Azure subscription.
28+
* If you don’t have an Azure subscription, [create an account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
29+
* An Azure Active Directory tenant associated with your subscription, either synchronized with an on-premises directory or a cloud-only directory.
30+
* If needed, [create an Azure Active Directory tenant][create-azure-ad-tenant] or [associate an Azure subscription with your account][associate-azure-ad-tenant].
31+
* An Azure Active Directory Domain Services managed domain enabled and configured in your Azure AD tenant.
32+
* If needed, the first tutorial [creates and configures an Azure Active Directory Domain Services instance][create-azure-ad-ds-instance].
33+
* A user account that's a member of the *Azure AD DC administrators* group in your Azure AD tenant.
34+
35+
## Create and connect to a CoreOS Linux VM
36+
37+
If you have an existing CoreOS Linux VM in Azure, connect to it using SSH, then continue on to the next step to [start configuring the VM](#configure-the-hosts-file).
38+
39+
If you need to create a CoreOS Linux VM, or want to create a test VM for use with this article, you can use one of the following methods:
3440

35-
## Provision a CoreOS Linux virtual machine
36-
Provision a CoreOS virtual machine in Azure, using any of the following methods:
3741
* [Azure portal](../virtual-machines/linux/quick-create-portal.md)
3842
* [Azure CLI](../virtual-machines/linux/quick-create-cli.md)
3943
* [Azure PowerShell](../virtual-machines/linux/quick-create-powershell.md)
4044

41-
This article uses the **CoreOS Linux (Stable)** virtual machine image in Azure.
42-
43-
> [!IMPORTANT]
44-
> * Deploy the virtual machine into the **same virtual network in which you have enabled Azure AD Domain Services**.
45-
> * Pick a **different subnet** than the one in which you have enabled Azure AD Domain Services.
46-
>
45+
When you create the VM, pay attention to the virtual network settings to make sure that the VM can communicate with the Azure AD DS managed domain:
4746

47+
* Deploy the VM into the same, or a peered, virtual network in which you have enabled Azure AD Domain Services.
48+
* Deploy the VM into a different subnet than your Azure AD Domain Services instance.
4849

49-
## Connect remotely to the newly provisioned Linux virtual machine
50-
The CoreOS virtual machine has been provisioned in Azure. The next task is to connect remotely to the virtual machine using the local administrator account created while provisioning the VM.
50+
Once the VM is deployed, follow the steps to connect to the VM using SSH.
5151

52-
Follow the instructions in the article [How to sign in to a virtual machine running Linux](../virtual-machines/linux/mac-create-ssh-keys.md?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
52+
## Configure the hosts file
5353

54-
55-
## Configure the hosts file on the Linux virtual machine
56-
In your SSH terminal, edit the /etc/hosts file and update your machine’s IP address and hostname.
54+
To make sure that the VM host name is correctly configured for the managed domain, edit the */etc/hosts* file and set the hostname:
5755

5856
```console
5957
sudo vi /etc/hosts
6058
```
6159

62-
In the hosts file, enter the following value:
60+
In the *hosts* file, update the *localhost* address. In the following example:
61+
62+
* *contoso.com* is the DNS domain name of your Azure AD DS managed domain.
63+
* *coreos* is the hostname of your CoreOS VM that you're joining to the managed domain.
64+
65+
Update these names with your own values:
6366

6467
```console
65-
127.0.0.1 contoso-coreos.contoso.com contoso-coreos
68+
127.0.0.1 coreos coreos.contoso.com
6669
```
6770

68-
Here, 'contoso.com' is the DNS domain name of your managed domain. 'contoso-coreos' is the hostname of the CoreOS virtual machine you are joining to the managed domain.
71+
When done, save and exit the *hosts* file using the `:wq` command of the editor.
72+
73+
## Configure the SSSD service
74+
75+
Update the */etc/sssd/sssd.conf* SSSD configuration.
76+
77+
```console
78+
sudo vi /etc/sssd/sssd.conf
79+
```
6980

81+
Specify your own Azure AD DS managed domain name for the following parameters:
7082

71-
## Configure the SSSD service on the Linux virtual machine
72-
Next, update your SSSD configuration file in ('/etc/sssd/sssd.conf') to match the following sample:
83+
* *domains* in ALL UPPER CASE
84+
* *[domain/CONTOSO]* where CONTOSO is in ALL UPPER CASE
85+
* *ldap_uri*
86+
* *ldap_search_base*
87+
* *krb5_server*
88+
* *krb5_realm* in ALL UPPER CASE
7389

7490
```console
7591
[sssd]
@@ -98,57 +114,61 @@ krb5_server = contoso.com
98114
krb5_realm = CONTOSO.COM
99115
```
100116

101-
Replace 'CONTOSO.COM' with the DNS domain name of your managed domain. Make sure you specify the domain name in capital case in the conf file.
117+
## Join the Linux virtual machine to the managed domain
102118

119+
With the SSSD configuration file updated, now join the virtual machine to the managed domain.
103120

104-
## Join the Linux virtual machine to the managed domain
105-
Now that the required packages are installed on the Linux virtual machine, the next task is to join the virtual machine to the managed domain.
121+
1. First, use the `adcli info` command to verify you can see information about the Azure AD DS managed domain. The following example gets information for the domain *CONTOSO.COM*. Specify your own Azure AD DS managed domain name in ALL UPPERCASE:
106122

107-
```console
108-
sudo adcli join -D CONTOSO.COM -U bob@CONTOSO.COM -K /etc/krb5.keytab -H contoso-coreos.contoso.com -N coreos
109-
```
123+
```console
124+
sudo adcli info CONTOSO.COM
125+
```
110126

127+
If the `adcli info` command can't find your Azure AD DS managed domain, review the following troubleshooting steps:
111128

112-
> [!NOTE]
113-
> **Troubleshooting:**
114-
> If *adcli* is unable to find your managed domain:
115-
> * Ensure that the domain is reachable from the virtual machine (try ping).
116-
> * Check that the virtual machine has indeed been deployed to the same virtual network in which the managed domain is available.
117-
> * Check to see if you have updated the DNS server settings for the virtual network to point to the domain controllers of the managed domain.
129+
* Make sure that the domain is reachable from the VM. Try `ping contoso.com` to see if a positive reply is returned.
130+
* Check that the VM is deployed to the same, or a peered, virtual network in which the Azure AD DS managed domain is available.
131+
* Confirm that the DNS server settings for the virtual network have been updated to point to the domain controllers of the Azure AD DS managed domain.
118132

119-
Start the SSSD service. In your SSH terminal, type the following command:
120-
121-
```console
122-
sudo systemctl start sssd.service
123-
```
133+
1. Now join the VM to the Azure AD DS managed domain using the `adcli join` command. Specify a user that belongs to the *AAD DC Administrators* group. If needed, [add a user account to a group in Azure AD](../active-directory/fundamentals/active-directory-groups-members-azure-portal.md).
134+
135+
Again, the Azure AD DS managed domain name must be entered in ALL UPPERCASE. In the following example, the account named `[email protected]` is used to initialize Kerberos. Enter your own user account that's a member of the *AAD DC Administrators* group.
124136

137+
```console
138+
sudo adcli join -D CONTOSO.COM -U [email protected] -K /etc/krb5.keytab -H coreos.contoso.com -N coreos
139+
```
125140

126-
## Verify domain join
127-
Verify whether the machine has been successfully joined to the managed domain. Connect to the domain joined CoreOS VM using a different SSH connection. Use a domain user account and then check to see if the user account is resolved correctly.
141+
The `adcli join` command doesn't return any information when the VM has successfully joined to the Azure AD DS managed domain.
128142

129-
1. In your SSH terminal, type the following command to connect to the domain joined CoreOS virtual machine using SSH. Use a domain account that belongs to the managed domain (for example, '[email protected]' in this case.)
130-
143+
1. To apply the domain-join configuration, start the SSSD service:
144+
131145
```console
132-
ssh -l [email protected] contoso-coreos.contoso.com
146+
sudo systemctl start sssd.service
133147
```
134148

135-
2. In your SSH terminal, type the following command to see if the home directory was initialized correctly.
136-
149+
## Sign in to the VM using a domain account
150+
151+
To verify that the VM has been successfully joined to the Azure AD DS managed domain, start a new SSH connection using a domain user account. Confirm that a home directory has been created, and that group membership from the domain is applied.
152+
153+
1. Create a new SSH connection from your console. Use a domain account that belongs to the managed domain using the `ssh -l` command, such as `[email protected]` and then enter the address of your VM, such as *coreos.contoso.com*. If you use the Azure Cloud Shell, use the public IP address of the VM rather than the internal DNS name.
154+
137155
```console
138-
pwd
156+
ssh -l [email protected] coreos.contoso.com
139157
```
140158

141-
3. In your SSH terminal, type the following command to see if the group memberships are being resolved correctly.
142-
159+
1. Now check that the group memberships are being resolved correctly:
160+
143161
```console
144162
id
145163
```
146164

165+
You should see your group memberships from the Azure AD DS managed domain.
166+
167+
## Next steps
147168

148-
## Troubleshooting domain join
149-
Refer to the [Troubleshooting domain join](join-windows-vm.md#troubleshoot-domain-join-issues) article.
169+
If you have problems connecting the VM to the Azure AD DS managed domain or signing in with a domain account, see [Troubleshooting domain join issues](join-windows-vm.md#troubleshoot-domain-join-issues).
150170

151-
## Related Content
152-
* [Azure AD Domain Services - Getting Started guide](tutorial-create-instance.md)
153-
* [Join a Windows Server virtual machine to an Azure AD Domain Services managed domain](active-directory-ds-admin-guide-join-windows-vm.md)
154-
* [How to sign in to a virtual machine running Linux](../virtual-machines/linux/mac-create-ssh-keys.md?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
171+
<!-- INTERNAL LINKS -->
172+
[create-azure-ad-tenant]: ../active-directory/fundamentals/sign-up-organization.md
173+
[associate-azure-ad-tenant]: ../active-directory/fundamentals/active-directory-how-subscriptions-associated-directory.md
174+
[create-azure-ad-ds-instance]: tutorial-create-instance.md

articles/active-directory-domain-services/join-rhel-linux-vm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ sudo yum install realmd sssd krb5-workstation krb5-libs oddjob oddjob-mkhomedir
8080

8181
## Join VM to the managed domain
8282

83-
Now that the required packages are installed on the VM and NTP is configured, join the VM to the Azure AD DS managed domain.
83+
Now that the required packages are installed on the VM, join the VM to the Azure AD DS managed domain.
8484

8585
1. Use the `realm discover` command to discover the Azure AD DS managed domain. The following example discovers the realm *CONTOSO.COM*. Specify your own Azure AD DS managed domain name in ALL UPPERCASE:
8686

0 commit comments

Comments
 (0)