diff --git a/rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec b/rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec index 87c7c6050f..d2686dcf34 100644 --- a/rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec +++ b/rpms/SPECS/4.3.0/wazuh-agent-4.3.0.spec @@ -369,9 +369,10 @@ if id -g ossec > /dev/null 2>&1; then find %{_localstatedir} -group ossec -user ossecr -exec chown wazuh:wazuh {} \; > /dev/null 2>&1 || true userdel ossecr fi +fi +if grep -q ossec /etc/group; then groupdel ossec fi - %preun if [ $1 = 0 ]; then