mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
passwdqc: align with usermngr (move PAM setup to usermngr)
This commit is contained in:
parent
33b62a44c5
commit
09323326f4
2 changed files with 0 additions and 22 deletions
|
|
@ -39,9 +39,6 @@ define Package/$(PKG_NAME)/install
|
|||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/security
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/pam_passwdqc.so $(1)/usr/lib/security/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/passwdqc.uci_default $(1)/etc/uci-defaults/99-add_passwdqc_pam
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
CONFIG_FILE="/etc/pam.d/common-password"
|
||||
# for some reason setting to 8 makes passwdqc accept minimum 12 letter password with this configuration
|
||||
# if we set it to 12 then we need atleast 16 characters and so on
|
||||
# passphrase = 0 means no space separated words
|
||||
# rest can be figured out from passwdqc man page
|
||||
MODULE_LINE="password requisite pam_passwdqc.so min=disabled,disabled,disabled,disabled,8 max=20 passphrase=0 retry=3 enforce=everyone"
|
||||
|
||||
# Ensure the file exists before modifying
|
||||
[ -f "$CONFIG_FILE" ] || exit 0
|
||||
|
||||
# Check if pam_passwdqc is already in the file
|
||||
if ! grep -q "pam_passwdqc.so" "$CONFIG_FILE"; then
|
||||
# Insert before pam_unix.so
|
||||
sed -i "/pam_unix.so/ i\\$MODULE_LINE" "$CONFIG_FILE"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Reference in a new issue