mirror of
https://github.com/bashclub/zamba-lxc-toolbox
synced 2026-02-18 15:36:20 +00:00
Add password for aggent registration
This commit is contained in:
@@ -10,4 +10,15 @@ source /root/zamba.conf
|
|||||||
source /root/constants-service.conf
|
source /root/constants-service.conf
|
||||||
|
|
||||||
WAZUH_VERSION=4.14
|
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
|
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"
|
||||||
Reference in New Issue
Block a user