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/active-directory-domain-services/join-centos-linux-vm.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Once the VM is deployed, follow the steps to connect to the VM using SSH.
54
54
55
55
To make sure that the VM host name is correctly configured for the managed domain, edit the */etc/hosts* file and set the hostname:
56
56
57
-
```console
57
+
```bash
58
58
sudo vi /etc/hosts
59
59
```
60
60
@@ -65,7 +65,7 @@ In the *hosts* file, update the *localhost* address. In the following example:
65
65
66
66
Update these names with your own values:
67
67
68
-
```console
68
+
```config
69
69
127.0.0.1 centos.aaddscontoso.com centos
70
70
```
71
71
@@ -75,7 +75,7 @@ When done, save and exit the *hosts* file using the `:wq` command of the editor.
75
75
76
76
The VM needs some additional packages to join the VM to the managed domain. To install and configure these packages, update and install the domain-join tools using `yum`:
@@ -85,7 +85,7 @@ Now that the required packages are installed on the VM, join the VM to the manag
85
85
86
86
1. Use the `realm discover` command to discover the managed domain. The following example discovers the realm *AADDSCONTOSO.COM*. Specify your own managed domain name in ALL UPPERCASE:
87
87
88
-
```console
88
+
```bash
89
89
sudo realm discover AADDSCONTOSO.COM
90
90
```
91
91
@@ -99,13 +99,13 @@ Now that the required packages are installed on the VM, join the VM to the manag
99
99
100
100
Again, the 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 part of the managed domain:
1. Finally, join the VM to the managed domain using the `realm join` command. Use the same user account that's a part of the managed domain that you specified in the previous `kinit` command, such as `[email protected]`:
@@ -123,21 +123,21 @@ By default, users can only sign in to a VM using SSH public key-based authentica
123
123
124
124
1. Open the *sshd_conf* file with an editor:
125
125
126
-
```console
126
+
```bash
127
127
sudo vi /etc/ssh/sshd_config
128
128
```
129
129
130
130
1. Update the line for*PasswordAuthentication* to *yes*:
131
131
132
-
```console
132
+
```bash
133
133
PasswordAuthentication yes
134
134
```
135
135
136
136
When done, save and exit the *sshd_conf* file using the `:wq`command of the editor.
137
137
138
138
1. To apply the changes and let users sign in using a password, restart the SSH service:
139
139
140
-
```console
140
+
```bash
141
141
sudo systemctl restart sshd
142
142
```
143
143
@@ -147,13 +147,13 @@ To grant members of the *AAD DC Administrators* group administrative privileges
147
147
148
148
1. Open the *sudoers* file for editing:
149
149
150
-
```console
150
+
```bash
151
151
sudo visudo
152
152
```
153
153
154
154
1. Add the following entry to the end of */etc/sudoers* file. The *AAD DC Administrators* group contains whitespace in the name, so include the backslash escape character in the group name. Add your own domain name, such as *aaddscontoso.com*:
155
155
156
-
```console
156
+
```config
157
157
# Add 'AAD DC Administrators' group members as admins.
@@ -166,29 +166,29 @@ To verify that the VM has been successfully joined to the managed domain, start
166
166
167
167
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 *centos.aaddscontoso.com*. If you use the Azure Cloud Shell, use the public IP address of the VM rather than the internal DNS name.
0 commit comments