From 03bb6186f23689be87b96c25be0fa94e5c6ed6d4 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Wed, 28 Jan 2026 19:40:21 +0000 Subject: [PATCH] Add password for aggent registration --- src/wazuh/install-service.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/wazuh/install-service.sh b/src/wazuh/install-service.sh index ff8af27..580df92 100644 --- a/src/wazuh/install-service.sh +++ b/src/wazuh/install-service.sh @@ -10,4 +10,15 @@ source /root/zamba.conf source /root/constants-service.conf WAZUH_VERSION=4.14 +REG_PASS=$(random_password) + curl -sO https://packages.wazuh.com/$WAZUH_VERSION/wazuh-install.sh && sudo bash ./wazuh-install.sh -a -i 2>/dev/null + + +sed -i "s|no|yes|" /var/ossec/etc/ossec.conf +echo "$REG_PASS" > /var/ossec/etc/authd.pass +chmod 640 /var/ossec/etc/authd.pass +chown root:wazuh /var/ossec/etc/authd.pass +systemctl restart wazuh-manager + +echo "Please use the following password for agent registration: $REG_PASS" \ No newline at end of file