Skip to content

Commit

Permalink
Merge pull request #3063 from wazuh/bug/3056-automated-installer-not-…
Browse files Browse the repository at this point in the history
…setting-the-kibanaserver-password-correctly

Fixed kibanaserver change password
  • Loading branch information
teddytpc1 authored Jul 30, 2024
2 parents ade721f + 1867c92 commit a438b43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unattended_installer/passwords_tool/passwordsFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function passwords_changePassword() {
for i in "${!passwords[@]}"
do
if [ -n "${indexer_installed}" ] && [ -f "/etc/wazuh-indexer/backup/internal_users.yml" ]; then
awk -v new=${hashes[i]} 'prev=="'${users[i]}':"{sub(/\042.*/,""); $0=$0 new} {prev=$1} 1' /etc/wazuh-indexer/backup/internal_users.yml > internal_users.yml_tmp && mv -f internal_users.yml_tmp /etc/wazuh-indexer/backup/internal_users.yml
awk -v new='"'"${hashes[i]}"'"' 'prev=="'${users[i]}':"{sub(/\042.*/,""); $0=$0 new} {prev=$1} 1' /etc/wazuh-indexer/backup/internal_users.yml > internal_users.yml_tmp && mv -f internal_users.yml_tmp /etc/wazuh-indexer/backup/internal_users.yml
fi

if [ "${users[i]}" == "admin" ]; then
Expand Down Expand Up @@ -277,10 +277,11 @@ function passwords_generatePassword() {
function passwords_generatePasswordFile() {

common_logger -d "Generating password file."
users=( admin kibanaserver kibanaro logstash readall snapshotrestore )
users=( admin anomalyadmin kibanaserver kibanaro logstash readall snapshotrestore )
api_users=( wazuh wazuh-wui )
user_description=(
"Admin user for the web user interface and Wazuh indexer. Use this user to log in to Wazuh dashboard"
"Anomaly detection user for the web user interface"
"Wazuh dashboard user for establishing the connection with Wazuh indexer"
"Regular Dashboard user, only has read permissions to all indices and all permissions on the .kibana index"
"Filebeat user for CRUD operations on Wazuh indices"
Expand Down

0 comments on commit a438b43

Please sign in to comment.