Add password for aggent registration

This commit is contained in:
Thorsten Spille
2026-01-28 19:40:21 +00:00
parent 1987dd29a7
commit 03bb6186f2

View File

@@ -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|<use_password>no</use_password>|<use_password>yes</use_password>|" /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"