Загрузка...

How to change wazuh-wui password - Wazuh Manager API

How to reset the password for the wazuh user:
1. Access your master node and navigate to the python3 console:

/var/ossec/framework/python/bin/python3

2. Once in the python3 console, import the update_user framework function and use it with the user_id and a new password. In this case, the user_id is 1 for the “wazuh” user.
from wazuh.security import update_user
update_user(user_id="1", password="NewPassword1!").render()

3. If the process was successful, you will receive the following output:
{'data': {'affected_items': [{'id': 1, 'username': 'wazuh', 'allow_run_as': True, 'roles': [1]}], 'total_affected_items': 1, 'total_failed_items': 0, 'failed_items': []}, 'message': 'User was successfully updated', 'error': 0}
This indicates that the user has been updated, and the password has been reset.
Then you can use that admin user (wazuh) to change wazuh-wui's password like below:

root@juan:/var/ossec/framework/python/bin# bash /usr/share/wazuh-indexer/plugins/opensearch-security/tools/wazuh-passwords-tool.sh --api -u wazuh-wui -p Wazuh-wui1234567 --admin-user wazuh --admin-password NewPassword1!
07/03/2025 19:58:09 INFO: The password for Wazuh API user wazuh-wui is Wazuh-wui1234567
07/03/2025 19:58:09 INFO: Updated wazuh-wui user password in wazuh dashboard. Remember to restart the service.

Видео How to change wazuh-wui password - Wazuh Manager API канала juancawalker
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки