From a20ba60503f53a7175f546212c5d8b71bacd2c0d Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Fri, 11 Apr 2025 18:16:58 -0700
Subject: [PATCH] Use system.check_password() to report on low-quality
 passwords

---
 exec/chksetup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/exec/chksetup.js b/exec/chksetup.js
index cf0359e48e..f01567027b 100644
--- a/exec/chksetup.js
+++ b/exec/chksetup.js
@@ -154,6 +154,10 @@ var tests = {
 					, usr.number
 					, password.length
 					, system.max_password_length));
+			else if(!system.check_password(password))
+				output.push(format("User #%-4u has a low quality password%s"
+					, usr.number
+					, options.verbose ? (': ' + password) : ''));
 			if(!system.trashcan("password", password))
 				continue;
 			output.push(format("User #%-4u has a disallowed password%s"
-- 
GitLab