Skip to content

Commit

Permalink
Fix assistant not changing api pass on single wazuh node
Browse files Browse the repository at this point in the history
  • Loading branch information
DFolchA committed Jul 4, 2022
1 parent 67b69df commit 855a2f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions unattended_installer/install_functions/installCommon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@ function installCommon_changePasswords() {
if [ -n "${start_indexer_cluster}" ] || [ -n "${AIO}" ]; then
passwords_runSecurityAdmin
fi

if [ -n "${wazuh}" ] || [ -n "${dashboard}" ] || [ -n "${AIO}" ]; then
if [ "${server_node_types[pos]}" == "master" ] || [ "${#server_node_names[@]}" -eq 0 ] || [ -n "${dashboard_installed}" ]; then
if [ "${server_node_types[pos]}" == "master" ] || [ "${#server_node_names[@]}" -eq 1 ] || [ -n "${dashboard_installed}" ]; then
installCommon_changePasswordApi
fi
fi
Expand Down
4 changes: 3 additions & 1 deletion unattended_installer/passwords_tool/passwordsFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ function passwords_changeDashboardApiPassword() {
until [ -n "${file_exists}" ] || [ "${j}" -eq "12" ]; do
if [ -f "/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml" ]; then
eval 'sed -i "s|password: .*|password: ${1}|g" /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml'
common_logger "Updated wazuh-wui user password in wazuh dashboard. Remember to restart the service."
if [ -z "${AIO}" ] && [ -z "${indexer}" ] && [ -z "${dashboard}" ] && [ -z "${wazuh}" ] && [ -z "${start_indexer_cluster}" ]; then
common_logger "Updated wazuh-wui user password in wazuh dashboard. Remember to restart the service."
fi
file_exists=1
fi
sleep 5
Expand Down

0 comments on commit 855a2f3

Please sign in to comment.