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: docs/guides/security/authentication/active_directory_authentication.md
+21-50Lines changed: 21 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,34 +12,23 @@ contributors: Steven Spencer, Sambhav Saggi, Antoine Le Morvan, Krista Burdine
12
12
13
13
## Introduction
14
14
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.
19
16
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.
24
18
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.
27
20
28
21
## Discovering and joining AD using SSSD
29
22
30
23
!!! Note
31
24
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.
35
26
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.
38
28
39
29
### Preparation
40
30
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:
@@ -48,10 +37,10 @@ AD cluster, to ensure that the network configuration is correct on both sides.
48
37
| LDAP | 389 (TCP+UDP) ||
49
38
| LDAP-GC | 3268 (TCP) | LDAP Global Catalog - allows you to source user IDs from AD |
50
39
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:
53
41
54
42
**With NetworkManager:**
43
+
55
44
```sh
56
45
# where your primary NetworkManager connection is 'System eth0' and your AD
57
46
# 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.
61
50
- Ensure that the time on both sides (AD host and Linux system) is synchronized (see chronyd)
62
51
63
52
**To check the time on Rocky Linux:**
53
+
64
54
```sh
65
55
[user@host ~]$ date
66
56
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.
75
65
76
66
### Discovery
77
67
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.
80
69
81
70
```sh
82
71
[user@host ~]$ realm discover ad.company.local
@@ -94,15 +83,11 @@ ad.company.local
94
83
required-package: samba-common
95
84
```
96
85
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.
99
87
100
88
### Joining
101
89
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.
106
91
107
92
```sh
108
93
[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
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.
157
139
158
140
### Setting the default domain
159
141
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.
165
143
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.
168
145
169
146
```sh
170
147
[user@host ~]$ sudo vi /etc/sssd/sssd.conf
@@ -173,20 +150,15 @@ tweak in your SSSD configuration file.
173
150
default_domain_suffix = ad.company.local
174
151
```
175
152
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
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]`.
180
154
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`.
183
156
184
157
```sh
185
158
[user@host ~]$ sudo systemctl restart sssd
186
159
```
187
160
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`:
190
162
191
163
```
192
164
[domain/ad.company.local]
@@ -198,8 +170,7 @@ Don't forget to restart the `sssd` service.
198
170
199
171
### Restrict to certain users
200
172
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:
203
174
204
175
Add those options into your configuration file `/etc/sssd/sssd.conf` and restart the service:
0 commit comments