Note: This is only a problem when the OS install owner user and groups are different.
A non-root upgrade fails during the post-installation step of the spectrum_nonroot_prepost_install.sh script because it attempts to assign group ownership to the install user instead of the install group․
ERROR MESSAGE: "chown: invalid group: '[install_user]:[install_user]'"
Network Observability DX NetOps Spectrum
Product Release: All supported version prior to 25.4.7
Installation Type: Non-root install or upgrade.
This only occurs when the environment uses a specific user and group for NetOps that do not share the same name (e.g., user 'spectrum' with group 'specadmin').
IMPACT: Prevents completion of post-installation steps and CAPKI deployment in non-root environments.
SYMPTOMS:
Upgrade fails at the post-installation stage (Option 2).
CAPKI fails to install during the non-root process.
Error occurs specifically when the script executes "chown -R $SPECOWNER:$SPECOWNER".
This is resolved in version 25.4.7.
For all supported versions prior:
PREREQUISITES:
Access to the spectrum_nonroot_prepost_install.sh script. This is located in the root directory of the install media.
Knowledge of the specific installation user and group for your environment.
A. Use the attached spectrum_nonroot_prepost_install.sh instead of the version that comes with the install media. Make sure to check the permissions and file ownership of the default file before replacing it.
e.g.
-rwxr-xr-x. 1 spectrum spectest 19839 Apr 16 16:14 spectrum_nonroot_prepost_install.sh
or.
B. Modify the file manually.
STEPS:
Open the spectrum_nonroot_prepost_install.sh script in the install media root directory.
UPDATE USER AND GROUP SETTINGS:
Find the logic for post-installation steps ..... elif [[ $whichstage == 2 ]]
add the 2 lines in bold.
elif [[ $whichstage == 2 ]]then eval `grep SPECROOT /opt/SPECTRUM/spectrum80.env` eval `grep SPECOWNER /opt/SPECTRUM/spectrum80.env` eval `grep HOST_NAME /opt/SPECTRUM/spectrum80.env` SS_INSTALL_OWNER=${SPECOWNER} SS_INSTALL_GROUP=$(id -gn ${SPECOWNER}) sed_param=s/USER=.*/USER=${SPECOWNER}/ echo "SPECROOT folder $SPECROOT" echo "Install user $SPECOWNER " echo "Install group $SS_INSTALL_GROUP"CORRECT OWNERSHIP COMMANDS:
Find and update the install_capki function within the script to use the defined install group instead of the owner variable for group ownership.
install_capki(){ echo "Installing capki" $SPECROOT/Install-Tools/CAPKI/setup install caller=SPECTRUM env=all chown -R $SPECOWNER:$SS_INSTALL_GROUP /opt/CA/SharedComponents}EXECUTE POST-INSTALLATION:
Run the modified script and select option 2 for post-installation steps.
Command: sudo ./spectrum_nonroot_prepost_install.sh
VERIFY SUCCESS:
Script completes without 'invalid group' errors.
Output displays: "Installing capki" followed by "Executing Postinstallation Steps Has Ended".
Verification of CAPKI installation in /opt/CA/SharedComponents.
Use the id <username> function in Linux to see what groups user is tied to.
getent group (cat /etc/group does not include LDAP) to verify user group e.g
spectrum:x:1009:
getent passwd to check user group e.g.
spectrum:x:1003:1009::/home/spectrum:/bin/bash