From b54804c431f619874abba6abad3f62977ce0eb5e Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Wed, 4 Feb 2026 17:56:38 +0000 Subject: [PATCH] Enhance phpLDAPadmin configuration to auto-increment UIDs at 10000 and GIDs at 5000, preventing conflicts with local system users. Inserts the configuration line before the closing ?> tag. --- .../unix/authentication/ldap_server/manifests/install.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/utilities/unix/authentication/ldap_server/manifests/install.pp b/modules/utilities/unix/authentication/ldap_server/manifests/install.pp index 32e2f42f0..c9b403301 100644 --- a/modules/utilities/unix/authentication/ldap_server/manifests/install.pp +++ b/modules/utilities/unix/authentication/ldap_server/manifests/install.pp @@ -61,11 +61,12 @@ class ldap_server::install { path => ['/bin', '/usr/bin'], } -> - # Configure phpLDAPadmin to start auto-incrementing UIDs at 10000 + # Configure phpLDAPadmin to start auto-incrementing UIDs at 10000 and GIDs at 5000 # This avoids conflicts with local system users (typically 1000-9999) + # Inserts the configuration line before the closing ?> tag exec { 'configure-phpldapadmin-auto-uid': - command => "/bin/sed -i \"s/^#\\?\\s*\\$servers->setValue('auto_number','min',array('uidNumber'=>[0-9]\\+/\\$servers->setValue('auto_number','min',array('uidNumber'=>10000/\" /etc/phpldapadmin/config.php", - onlyif => "/bin/grep -q \"auto_number.*uidNumber\" /etc/phpldapadmin/config.php", + command => "/bin/sed -i \"/^?>$/i \\$servers->setValue('auto_number','min',array('uidNumber'=>10000,'gidNumber'=>5000));\" /etc/phpldapadmin/config.php", + unless => "/bin/grep -q \"auto_number.*uidNumber\" /etc/phpldapadmin/config.php", path => ['/bin', '/usr/bin'], } ->