Skip to content

Commit 35e170c

Browse files
authored
Merge branch 'MicrosoftDocs:main' into cdcupdate
2 parents 87762cf + 3efbe73 commit 35e170c

File tree

11 files changed

+86
-85
lines changed

11 files changed

+86
-85
lines changed

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Once the VM is deployed, follow the steps to connect to the VM using SSH.
5454

5555
To make sure that the VM host name is correctly configured for the managed domain, edit the */etc/hosts* file and set the hostname:
5656

57-
```console
57+
```bash
5858
sudo vi /etc/hosts
5959
```
6060

@@ -65,7 +65,7 @@ In the *hosts* file, update the *localhost* address. In the following example:
6565

6666
Update these names with your own values:
6767

68-
```console
68+
```config
6969
127.0.0.1 centos.aaddscontoso.com centos
7070
```
7171

@@ -75,7 +75,7 @@ When done, save and exit the *hosts* file using the `:wq` command of the editor.
7575

7676
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`:
7777

78-
```console
78+
```bash
7979
sudo yum install adcli realmd sssd krb5-workstation krb5-libs oddjob oddjob-mkhomedir samba-common-tools
8080
```
8181

@@ -85,7 +85,7 @@ Now that the required packages are installed on the VM, join the VM to the manag
8585

8686
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:
8787

88-
```console
88+
```bash
8989
sudo realm discover AADDSCONTOSO.COM
9090
```
9191

@@ -99,13 +99,13 @@ Now that the required packages are installed on the VM, join the VM to the manag
9999

100100
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:
101101
102-
```console
103-
102+
```bash
103+
sudo kinit [email protected]
104104
```
105105
106106
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]`:
107107

108-
```console
108+
```bash
109109
sudo realm join --verbose AADDSCONTOSO.COM -U '[email protected]' --membership-software=adcli
110110
```
111111

@@ -123,21 +123,21 @@ By default, users can only sign in to a VM using SSH public key-based authentica
123123

124124
1. Open the *sshd_conf* file with an editor:
125125

126-
```console
126+
```bash
127127
sudo vi /etc/ssh/sshd_config
128128
```
129129

130130
1. Update the line for *PasswordAuthentication* to *yes*:
131131

132-
```console
132+
```bash
133133
PasswordAuthentication yes
134134
```
135135

136136
When done, save and exit the *sshd_conf* file using the `:wq` command of the editor.
137137

138138
1. To apply the changes and let users sign in using a password, restart the SSH service:
139139

140-
```console
140+
```bash
141141
sudo systemctl restart sshd
142142
```
143143

@@ -147,13 +147,13 @@ To grant members of the *AAD DC Administrators* group administrative privileges
147147

148148
1. Open the *sudoers* file for editing:
149149

150-
```console
150+
```bash
151151
sudo visudo
152152
```
153153

154154
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*:
155155

156-
```console
156+
```config
157157
# Add 'AAD DC Administrators' group members as admins.
158158
%AAD\ DC\ [email protected] ALL=(ALL) NOPASSWD:ALL
159159
```
@@ -166,29 +166,29 @@ To verify that the VM has been successfully joined to the managed domain, start
166166

167167
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.
168168

169-
```console
170-
ssh -l [email protected] centos.aaddscontoso.com
169+
```bash
170+
sudo ssh -l [email protected] centos.aaddscontoso.com
171171
```
172172

173173
1. When you've successfully connected to the VM, verify that the home directory was initialized correctly:
174174
175-
```console
176-
pwd
175+
```bash
176+
sudo pwd
177177
```
178178
179179
You should be in the */home* directory with your own directory that matches the user account.
180180
181181
1. Now check that the group memberships are being resolved correctly:
182182
183-
```console
184-
id
183+
```bash
184+
sudo id
185185
```
186186
187187
You should see your group memberships from the managed domain.
188188
189189
1. If you signed in to the VM as a member of the *AAD DC Administrators* group, check that you can correctly use the `sudo` command:
190190
191-
```console
191+
```bash
192192
sudo yum update
193193
```
194194

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

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Once the VM is deployed, follow the steps to connect to the VM using SSH.
5353

5454
To make sure that the VM host name is correctly configured for the managed domain, edit the */etc/hosts* file and set the hostname:
5555

56-
```console
56+
```bash
5757
sudo vi /etc/hosts
5858
```
5959

@@ -64,7 +64,7 @@ In the *hosts* file, update the *localhost* address. In the following example:
6464

6565
Update these names with your own values:
6666

67-
```console
67+
```config
6868
127.0.0.1 linux-q2gr linux-q2gr.aaddscontoso.com
6969
```
7070

@@ -178,7 +178,7 @@ To join the managed domain using **winbind** and the *YaST command line interfac
178178

179179
* Join the domain:
180180

181-
```console
181+
```bash
182182
sudo yast samba-client joindomain domain=aaddscontoso.com user=<admin> password=<admin password> machine=<(optional) machine account>
183183
```
184184

@@ -188,15 +188,15 @@ To join the managed domain using **winbind** and the *`samba net` command*:
188188

189189
1. Install kerberos client and samba-winbind:
190190

191-
```console
191+
```bash
192192
sudo zypper in krb5-client samba-winbind
193193
```
194194

195195
2. Edit the configuration files:
196196

197197
* /etc/samba/smb.conf
198198

199-
```ini
199+
```config
200200
[global]
201201
workgroup = AADDSCONTOSO
202202
usershare allow guests = NO #disallow guests from sharing
@@ -215,7 +215,7 @@ To join the managed domain using **winbind** and the *`samba net` command*:
215215

216216
* /etc/krb5.conf
217217

218-
```ini
218+
```config
219219
[libdefaults]
220220
default_realm = AADDSCONTOSO.COM
221221
clockskew = 300
@@ -239,7 +239,7 @@ To join the managed domain using **winbind** and the *`samba net` command*:
239239

240240
* /etc/security/pam_winbind.conf
241241

242-
```ini
242+
```config
243243
[global]
244244
cached_login = yes
245245
krb5_auth = yes
@@ -249,46 +249,46 @@ To join the managed domain using **winbind** and the *`samba net` command*:
249249

250250
* /etc/nsswitch.conf
251251

252-
```ini
252+
```config
253253
passwd: compat winbind
254254
group: compat winbind
255255
```
256256

257257
3. Check that the date and time in Azure AD and Linux are in sync. You can do this by adding the Azure AD server to the NTP service:
258258

259-
1. Add the following line to /etc/ntp.conf:
259+
1. Add the following line to `/etc/ntp.conf`:
260260

261-
```console
261+
```config
262262
server aaddscontoso.com
263263
```
264264

265265
1. Restart the NTP service:
266266

267-
```console
267+
```bash
268268
sudo systemctl restart ntpd
269269
```
270270

271271
4. Join the domain:
272272

273-
```console
273+
```bash
274274
sudo net ads join -U Administrator%Mypassword
275275
```
276276

277277
5. Enable winbind as a login source in the Linux Pluggable Authentication Modules (PAM):
278278

279-
```console
280-
pam-config --add --winbind
279+
```bash
280+
config pam-config --add --winbind
281281
```
282282

283283
6. Enable automatic creation of home directories so that users can log in:
284284

285-
```console
286-
pam-config -a --mkhomedir
285+
```bash
286+
sudo pam-config -a --mkhomedir
287287
```
288288

289289
7. Start and enable the winbind service:
290290

291-
```console
291+
```bash
292292
sudo systemctl enable winbind
293293
sudo systemctl start winbind
294294
```
@@ -299,21 +299,21 @@ By default, users can only sign in to a VM using SSH public key-based authentica
299299

300300
1. Open the *sshd_conf* file with an editor:
301301

302-
```console
302+
```bash
303303
sudo vi /etc/ssh/sshd_config
304304
```
305305

306306
1. Update the line for *PasswordAuthentication* to *yes*:
307307

308-
```console
308+
```config
309309
PasswordAuthentication yes
310310
```
311311

312312
When done, save and exit the *sshd_conf* file using the `:wq` command of the editor.
313313

314314
1. To apply the changes and let users sign in using a password, restart the SSH service:
315315

316-
```console
316+
```bash
317317
sudo systemctl restart sshd
318318
```
319319

@@ -323,13 +323,13 @@ To grant members of the *AAD DC Administrators* group administrative privileges
323323

324324
1. Open the *sudoers* file for editing:
325325

326-
```console
326+
```bash
327327
sudo visudo
328328
```
329329

330330
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*:
331331

332-
```console
332+
```config
333333
# Add 'AAD DC Administrators' group members as admins.
334334
%AAD\ DC\ [email protected] ALL=(ALL) NOPASSWD:ALL
335335
```
@@ -342,29 +342,29 @@ To verify that the VM has been successfully joined to the managed domain, start
342342

343343
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 *linux-q2gr.aaddscontoso.com*. If you use the Azure Cloud Shell, use the public IP address of the VM rather than the internal DNS name.
344344

345-
```console
346-
ssh -l [email protected] linux-q2gr.aaddscontoso.com
345+
```bash
346+
sudo ssh -l [email protected] linux-q2gr.aaddscontoso.com
347347
```
348348

349349
2. When you've successfully connected to the VM, verify that the home directory was initialized correctly:
350350
351-
```console
352-
pwd
351+
```bash
352+
sudo pwd
353353
```
354354
355355
You should be in the */home* directory with your own directory that matches the user account.
356356
357357
3. Now check that the group memberships are being resolved correctly:
358358
359-
```console
360-
id
359+
```bash
360+
sudo id
361361
```
362362
363363
You should see your group memberships from the managed domain.
364364
365365
4. If you signed in to the VM as a member of the *AAD DC Administrators* group, check that you can correctly use the `sudo` command:
366366
367-
```console
367+
```bash
368368
sudo zypper update
369369
```
370370

0 commit comments

Comments
 (0)