Re: [Lam-public] Issue migrating custom scripts from LAM Pro 8.4 to LAM Pro 9.3. GAM scripts
Brought to you by:
gruberroland
|
From: Roland G. <po...@ro...> - 2025-11-20 19:43:32
|
Hi Larry, thanks a lot for your detailed bug report. I was able to reproduce it and it will be fixed in 9.4. The RC-version for 9.4 will be published in the next few days anyway. Here is the ticket for tracking: https://github.com/LDAPAccountManager/lam/issues/517 Best regards Roland Am 20.11.25 um 18:19 schrieb Larry Dillon: > We had custom scripts written by my predecessor working under LAM 8.4 but > can't get them working under 9.3 > > The scripts in the module setting look like this. Basically just removed > "user" before the scripts. > > postCreate /opt/lam-helpers/userAdd.sh $mail$ $givenname$ $sn$ > $INFO.userPasswordClearText$ > postModify /opt/lam-helpers/userModify.sh $mail$ > $INFO.userPasswordClearText$ > postDelete /opt/lam-helpers/userDelete.sh $mail$ > > Example script: userAdd.sh > > #!/bin/sh > mail=$1 > fname=$2 > lname=$3 > pass=$4 > > # Add the User to Google Apps > if [[ $mail =~ "@example.edu" ]] ; then > /usr/bin/sudo -u gam /home/gam/bin/gam/gam create user $mail firstname > "$fname" lastname "$lname" password "$pass" > echo "Adding User to Google Apps via GAM script" > else > echo "Not an Example email address, no Google account created" > fi > > > After some searching, it's throwing errors in /var/log/php-fpm/ > OS is: AlmaLinux 9.6 > PHP is: PHP 8.4.14 > > > [14-Nov-2025 18:19:01 UTC] PHP Fatal error: Uncaught Error: Call to a > member function get_type() on null in > /usr/share/ldap-account-manager/lib/modules/customScripts.inc:590 > Stack trace: > #0 /usr/share/ldap-account-manager/lib/modules/customScripts.inc(491): > customScripts->runCommands() > #1 /usr/share/ldap-account-manager/lib/modules.inc(631): > customScripts->doUploadPostActions() > #2 /usr/share/ldap-account-manager/lib/upload.inc(276): > doUploadPostActions() > #3 /usr/share/ldap-account-manager/lib/upload.inc(260): > LAM\UPLOAD\Uploader->runModulePostActions() > #4 /usr/share/ldap-account-manager/lib/upload.inc(99): > LAM\UPLOAD\Uploader->runPostActions() > #5 /usr/share/ldap-account-manager/templates/misc/ajax.php(175): > LAM\UPLOAD\Uploader->doUpload() > #6 /usr/share/ldap-account-manager/templates/misc/ajax.php(76): > LAM\AJAX\Ajax->handleRequest() > #7 {main} > thrown in /usr/share/ldap-account-manager/lib/modules/customScripts.inc > on line 590 > [14-Nov-2025 18:19:06 UTC] PHP Fatal error: Uncaught Error: Call to a > member function get_type() on null in > /usr/share/ldap-account-manager/lib/modules/customScripts.inc:590 > Stack trace: > #0 /usr/share/ldap-account-manager/lib/modules/customScripts.inc(491): > customScripts->runCommands() > #1 /usr/share/ldap-account-manager/lib/modules.inc(631): > customScripts->doUploadPostActions() > #2 /usr/share/ldap-account-manager/lib/upload.inc(276): > doUploadPostActions() > #3 /usr/share/ldap-account-manager/lib/upload.inc(260): > LAM\UPLOAD\Uploader->runModulePostActions() > #4 /usr/share/ldap-account-manager/lib/upload.inc(99): > LAM\UPLOAD\Uploader->runPostActions() > #5 /usr/share/ldap-account-manager/templates/misc/ajax.php(175): > LAM\UPLOAD\Uploader->doUpload() > #6 /usr/share/ldap-account-manager/templates/misc/ajax.php(76): > LAM\AJAX\Ajax->handleRequest() > #7 {main} > thrown in /usr/share/ldap-account-manager/lib/modules/customScripts.inc > on line 590 > [14-Nov-2025 18:24:23 UTC] PHP Deprecated: htmlspecialchars(): Passing > null to parameter #1 ($string) of type string is deprecated in > /usr/share/ldap-account-manager/lib/html.inc on line 1918 > [14-Nov-2025 18:24:59 UTC] PHP Deprecated: htmlspecialchars(): Passing > null to parameter #1 ($string) of type string is deprecated in > /usr/share/ldap-account-manager/lib/html.inc on line 1918 > [14-Nov-2025 20:35:00 UTC] PHP Warning: Undefined array key > "windowsUser_pwdMustChange" in > /usr/share/ldap-account-manager/lib/modules/windowsUser.inc on line 3300 > [14-Nov-2025 20:35:00 UTC] PHP Warning: Undefined array key "" in > /usr/share/ldap-account-manager/lib/modules/windowsUser.inc on line 3300 > [14-Nov-2025 20:35:05 UTC] PHP Warning: Undefined array key > "windowsUser_pwdMustChange" in > /usr/share/ldap-account-manager/lib/modules/windowsUser.inc on line 3476 > [14-Nov-2025 20:35:07 UTC] PHP Fatal error: Uncaught Error: Call to a > member function get_type() on null in > /usr/share/ldap-account-manager/lib/modules/customScripts.inc:590 > > Any ideas what we're doing wrong? > > Larry > > > > _______________________________________________ > Lam-public mailing list > Lam...@li... > https://lists.sourceforge.net/lists/listinfo/lam-public |