Skip to content

Commit

Permalink
Merge pull request #3118 from wazuh/bug/3115-fix-filebeat-credentials…
Browse files Browse the repository at this point in the history
…-update

Change Filebeat passwords only when installing Wazuh Server or changing passwords
  • Loading branch information
c-bordon authored Sep 16, 2024
2 parents f1f03dd + 0c22d32 commit b7600a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unattended_installer/passwords_tool/passwordsFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function passwords_changePassword() {
fi

if [ "${nuser}" == "admin" ] || [ -n "${changeall}" ]; then
if [ -n "${filebeat_installed}" ]; then
if [ -n "${filebeat_installed}" ] && [ -z "${dashboard}" ]; then
file_username=$(grep "username:" /etc/filebeat/filebeat.yml | awk '{print $2}')
file_password=$(grep "password:" /etc/filebeat/filebeat.yml | awk '{print $2}')
if [ "$file_username" != "\${username}" ] || [ "$file_password" != "\${password}" ]; then
Expand Down

0 comments on commit b7600a1

Please sign in to comment.