Skip to content

Commit 7e1ad2d

Browse files
committed
# fix wonky formatting
1 parent 79d14f4 commit 7e1ad2d

File tree

1 file changed

+21
-50
lines changed

1 file changed

+21
-50
lines changed

docs/guides/security/authentication/active_directory_authentication.md

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,23 @@ contributors: Steven Spencer, Sambhav Saggi, Antoine Le Morvan, Krista Burdine
1212

1313
## Introduction
1414

15-
Microsoft's Active Directory (AD) is, in most enterprises, the de facto
16-
authentication system for Windows systems and for external, LDAP-connected
17-
services. It allows you to configure users and groups, access control,
18-
permissions, auto-mounting, and more.
15+
In most enterprises, Microsoft's Active Directory (AD) is the default authentication system for Windows systems and for external, LDAP-connected services. It allows you to configure users and groups, access control, permissions, auto-mounting, and more.
1916

20-
Now, while connecting Linux to an AD cluster cannot support _all_ of the
21-
features mentioned, it can handle users, groups, and access control. It is even
22-
possible (through some configuration tweaks on the Linux side and some advanced
23-
options on the AD side) to distribute SSH keys using AD.
17+
Now, while connecting Linux to an AD cluster cannot support _all_ of the features mentioned, it can handle users, groups, and access control. It is possible (through some configuration tweaks on the Linux side and some advanced options on the AD side) to distribute SSH keys using AD.
2418

25-
This guide, however, will just cover configuring authentication against Active
26-
Directory, and will not include any extra configuration on the Windows side.
19+
This guide, however, will just cover configuring authentication against Active Directory, and will not include any extra configuration on the Windows side.
2720

2821
## Discovering and joining AD using SSSD
2922

3023
!!! Note
3124

32-
Throughout this guide, the domain name `ad.company.local` will be used to
33-
represent the Active Directory domain. To follow this guide, replace it with
34-
the actual domain name your AD domain uses.
25+
The domain name `ad.company.local` throughout this guide will represent the Active Directory domain. To follow this guide, replace it with your AD domain's actual domain name.
3526

36-
The first step along the way to join a Linux system into AD is to discover your
37-
AD cluster, to ensure that the network configuration is correct on both sides.
27+
The first step along the way to join a Linux system into AD is to discover your AD cluster, to ensure that the network configuration is correct on both sides.
3828

3929
### Preparation
4030

41-
- Ensure the following ports are open to your Linux host on your domain
42-
controller:
31+
- Ensure the following ports are open to your Linux host on your domain controller:
4332

4433
| Service | Port(s) | Notes |
4534
|----------|-------------------|-------------------------------------------------------------|
@@ -48,10 +37,10 @@ AD cluster, to ensure that the network configuration is correct on both sides.
4837
| LDAP | 389 (TCP+UDP) | |
4938
| LDAP-GC | 3268 (TCP) | LDAP Global Catalog - allows you to source user IDs from AD |
5039

51-
- Ensure you have configured your AD domain controller as a DNS server on your
52-
Rocky Linux host:
40+
- Ensure you have configured your AD domain controller as a DNS server on your Rocky Linux host:
5341

5442
**With NetworkManager:**
43+
5544
```sh
5645
# where your primary NetworkManager connection is 'System eth0' and your AD
5746
# server is accessible on the IP address 10.0.0.2.
@@ -61,6 +50,7 @@ AD cluster, to ensure that the network configuration is correct on both sides.
6150
- Ensure that the time on both sides (AD host and Linux system) is synchronized (see chronyd)
6251

6352
**To check the time on Rocky Linux:**
53+
6454
```sh
6555
[user@host ~]$ date
6656
Wed 22 Sep 17:11:35 BST 2021
@@ -75,8 +65,7 @@ AD cluster, to ensure that the network configuration is correct on both sides.
7565

7666
### Discovery
7767

78-
Now, you should be able to successfully discover your AD server(s) from your
79-
Linux host.
68+
Now, you should be able to successfully discover your AD server(s) from your Linux host.
8069

8170
```sh
8271
[user@host ~]$ realm discover ad.company.local
@@ -94,15 +83,11 @@ ad.company.local
9483
required-package: samba-common
9584
```
9685

97-
This will be discovered using the relevant SRV records stored in your Active
98-
Directory DNS service.
86+
This will be discovered using the relevant SRV records stored in your Active Directory DNS service.
9987

10088
### Joining
10189

102-
Once you have successfully discovered your Active Directory installation from
103-
the Linux host, you should be able to use `realmd` to join the domain, which
104-
will orchestrate the configuration of `sssd` using `adcli` and some other such
105-
tools.
90+
Once you have successfully discovered your Active Directory installation from the Linux host, you should be able to use `realmd` to join the domain, which will orchestrate the configuration of `sssd` using `adcli` and some other such tools.
10691

10792
```sh
10893
[user@host ~]$ sudo realm join ad.company.local
@@ -114,8 +99,7 @@ If this process complains about encryption with `KDC has no support for encrypti
11499
[user@host ~]$ sudo update-crypto-policies --set DEFAULT:AD-SUPPORT
115100
```
116101

117-
If this process succeeds, you should now be able to pull `passwd` information
118-
for an Active Directory user.
102+
If this process succeeds, you should now be able to pull `passwd` information for an Active Directory user.
119103

120104
```sh
121105
[user@host ~]$ sudo getent passwd [email protected]
@@ -137,8 +121,7 @@ [email protected]:*:1450400500:1450400513:Administrator:/home/admin
137121

138122
### Attempting to Authenticate
139123

140-
Now your users should be able to authenticate to your Linux host against Active
141-
Directory.
124+
Now your users should be able to authenticate to your Linux host against Active Directory.
142125

143126
**On Windows 10:** (which provides its own copy of OpenSSH)
144127

@@ -152,19 +135,13 @@ Last login: Wed Sep 15 17:37:03 2021 from 10.0.10.241
152135
153136
```
154137

155-
If this succeeds, you have successfully configured Linux to use Active
156-
Directory as an authentication source.
138+
If this succeeds, you have successfully configured Linux to use Active Directory as an authentication source.
157139

158140
### Setting the default domain
159141

160-
In a completely default setup, you will need to log in with your AD account by
161-
specifying the domain in your username (e.g., `[email protected]`). If
162-
this is not the desired behavior, and you instead want to be able to omit the
163-
domain name at authentication time, you can configure SSSD to default to a
164-
specific domain.
142+
In a completely default setup, you will need to log in with your AD account by specifying the domain in your username (e.g., `[email protected]`). If this is not the desired behavior, and you instead want to be able to omit the domain name at authentication time, you can configure SSSD to default to a specific domain.
165143

166-
This is actually a relatively simple process, and just requires a configuration
167-
tweak in your SSSD configuration file.
144+
This is actually a relatively simple process, and just requires a configuration tweak in your SSSD configuration file.
168145

169146
```sh
170147
[user@host ~]$ sudo vi /etc/sssd/sssd.conf
@@ -173,20 +150,15 @@ tweak in your SSSD configuration file.
173150
default_domain_suffix = ad.company.local
174151
```
175152

176-
By adding the `default_domain_suffix`, you are instructing SSSD to (if no
177-
other domain is specified) infer that the user is trying to authenticate as a
178-
user from the `ad.company.local` domain. This allows you to authenticate as
179-
something like `john.doe` instead of `[email protected]`.
153+
By adding the `default_domain_suffix`, you are instructing SSSD to (if no other domain is specified) infer that the user is trying to authenticate as a user from the `ad.company.local` domain. This allows you to authenticate as something like `john.doe` instead of `[email protected]`.
180154

181-
To make this configuration change take effect, you must restart the
182-
`sssd.service` unit with `systemctl`.
155+
To make this configuration change take effect, you must restart the `sssd.service` unit with `systemctl`.
183156

184157
```sh
185158
[user@host ~]$ sudo systemctl restart sssd
186159
```
187160

188-
In the same way, if you don't want your home directories to be suffixed by the domain name,
189-
you can add those options into your configuration file `/etc/sssd/sssd.conf`:
161+
In the same way, if you don't want your home directories to be suffixed by the domain name, you can add those options into your configuration file `/etc/sssd/sssd.conf`:
190162

191163
```
192164
[domain/ad.company.local]
@@ -198,8 +170,7 @@ Don't forget to restart the `sssd` service.
198170

199171
### Restrict to certain users
200172

201-
There are various methods to restrict access to the server to a limited list of users,
202-
but this, as the name suggests, is certainly the simplest:
173+
There are various methods to restrict access to the server to a limited list of users, but this, as the name suggests, is certainly the simplest:
203174

204175
Add those options into your configuration file `/etc/sssd/sssd.conf` and restart the service:
205176

0 commit comments

Comments
 (0)