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/installation/additional_integration.asciidoc
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,6 +199,44 @@ Validate with Ok and provide the account that will run this task (usually _DOMAI
199
199
200
200
==== Disabled Account
201
201
202
+
===== Preventing Authentication of Disabled Accounts via LDAP Filter
203
+
204
+
You can prevent disabled Active Directory accounts from authenticating through PacketFence by adding an LDAP filter that excludes accounts with the `ACCOUNTDISABLE` flag set.
205
+
206
+
In Active Directory, the `userAccountControl` attribute contains bitwise flags that indicate account properties. Bit 2 (`0x2`) corresponds to `ACCOUNTDISABLE`. The following LDAP filter uses the bitwise AND matching rule (`1.2.840.113556.1.4.803`) to check whether this bit is set, and excludes those accounts from search results:
207
+
208
+
----
209
+
(!(userAccountControl:1.2.840.113556.1.4.803:=2))
210
+
----
211
+
212
+
To configure this in PacketFence:
213
+
214
+
. Go to _Configuration -> Policies and Access Control -> Authentication Sources_.
215
+
. Edit your Active Directory authentication source.
216
+
. In the _Append search attributes LDAP filter_ field, paste the filter above.
217
+
. Save the configuration.
218
+
219
+
With this filter in place, any LDAP search performed during authentication will automatically exclude disabled accounts, preventing them from authenticating.
220
+
221
+
NOTE: This is a *preventive* approach that blocks authentication at LDAP search time. It applies globally to all searches performed by this authentication source. To apply the check at the level of individual authentication rules instead, see the next section.
222
+
223
+
===== Filtering Disabled Accounts in Authentication Rules
224
+
225
+
You can also check the `userAccountControl` attribute directly in authentication rule conditions using the *has bit* and *not has bit* operators. These operators perform a bitwise AND check against the attribute value, which is the correct way to test individual flags in a bitmask attribute like `userAccountControl`.
226
+
227
+
To create a rule that rejects disabled accounts:
228
+
229
+
. Go to _Configuration -> Policies and Access Control -> Authentication Sources_.
230
+
. Edit your Active Directory authentication source and open an authentication rule.
231
+
. Add a condition: `userAccountControl` -> *not has bit* -> `2`.
232
+
. Save the rule.
233
+
234
+
This condition excludes accounts that have the `ACCOUNTDISABLE` bit set (bit 2), regardless of what other flags are present in `userAccountControl`.
235
+
236
+
NOTE: Standard operators like _equals_ or _not equals_ perform a simple string comparison on the full `userAccountControl` value and are not suitable for bitmask attributes. Always use _has bit_ or _not has bit_ when checking individual flags.
237
+
238
+
===== Unregistering Nodes When an Account is Disabled (Event-Based)
239
+
202
240
Create the script `unreg_node_disabled_account.ps1` on the Windows Server with the following content:
0 commit comments