Wazuh agent enrollment password authentication

Set an enrollment password so only hosts you approved can register as Wazuh agents, with the password distributed through deployment variables and protected in authd.pass.

On this page

Why Wazuh agent enrollment password authentication matters

An enrollment password is a shared secret that the Wazuh manager's enrollment service checks before it accepts a new agent. Teams need it when the manager accepts registrations on the network and any host that can reach the enrollment port could otherwise register as an agent. In that situation, an unknown host could receive configuration, appear in the agent inventory and report false telemetry, so the control belongs on the first day of deployment rather than after an incident. The enrollment password is the gate on registration, not a replacement for the rest of the design.

The password is one layer alongside network controls and certificates. Firewall rules limit which hosts can reach the enrollment service at all, and certificate-based identity verification, covered in a sibling topic, lets agents and the manager verify each other. The password adds a check that a host must pass during enrollment, and it is most useful as a backstop when a host can reach the manager but was never meant to join. Plan all three together and record which host groups each control covers, so a gap in one does not go unnoticed.

Exact behavior depends on the release in use, so confirm the enrollment password settings, file location and permission requirements against the Wazuh release notes and the troubleshooting guide for your version before you change production. Ask whether your installation method sets the password for you and who holds the value afterward. Those answers determine how much work the rollout needs and who must be involved.

How an agent enrollment request reaches the Wazuh server

The flow starts on the endpoint, where the installer or deployment script reads the enrollment password from the WAZUH_REGISTRATION_PASSWORD variable and writes it to authd.pass. The agent then sends its enrollment request across the boundary between the endpoint network and the Wazuh server. The server's enrollment service checks the supplied password against its own authd.pass before it issues the agent key. Check two things: that the password file is readable only by root on both sides, and that a host presenting a wrong or missing password is refused before any key is issued.

Where the enrollment password is stored, checked and where unknown hosts are refused.

Enrollment password options and when each fits

This table compares four ways to control which hosts can enroll as Wazuh agents, from network restriction alone to pairing a password with certificate verification. Read each row for when the option fits, what it protects and what it leaves open, then pick the lightest option that matches your risk.

OptionWhen it fitsWhat it protectsWhat it does not protect
No password, network restriction onlySmall, isolated lab or test environments where only known hosts can reach the manager's enrollment portHosts outside the permitted network paths cannot reach the registration serviceAny host that can reach the network can attempt to enroll, and a compromised internal host can enroll as an agent
Shared enrollment password in authd.passProduction fleets where you want a simple gate and can keep the manager's file locked downUnknown hosts without the password cannot register through the default enrollment pathThe password is shared, so anyone who reads it can enroll a host, and it does not verify the manager's identity to agents
Password distributed with WAZUH_REGISTRATION_PASSWORDAutomated builds using deployment variables, where the password must reach many hosts without manual stepsKeeps the password out of manual per-host steps and gives one value to rotate in your deployment toolingThe value is still a shared secret, so it can leak through deployment logs, images or copies of the tooling
Password plus certificate-based verificationRegulated or high-trust environments where both the manager and each agent must prove identity during enrollmentAdds mutual verification on top of the shared password, so a host holding only the password is not enoughRequires CA setup and certificate lifecycle work covered on the sibling certificate page, and errors can block enrollment

How to set an enrollment password on the Wazuh server

This sequence restricts agent registration to hosts that hold the enrollment password, so unknown machines are refused before they receive a configuration. Each step ends with a check you can run before moving on.

  1. Decide where the enrollment password comes from

    Before touching the server, the security owner and the platform team agree on where the password is generated, who can read it, and how it reaches the deployment tooling. Use a long, random value from your secrets manager or password generator, and record its owner and the date it was set in your change record. Confirm with your own change process who may approve a rotation later. The step is done when one named person can state where the authoritative copy lives and who can read it.

  2. Write the password to authd.pass

    On the Wazuh server, create the file authd.pass in /var/ossec/etc/ and place only the password in it, with no extra spaces or line breaks added by an editor. Avoid pasting the value into shell history or a shared terminal session. Run a read-back in a controlled session to confirm the file holds a single line. The step is done when the file exists in the expected directory and contains exactly the value recorded in the previous step.

  3. Set root ownership and 640 permissions

    Set the owner of authd.pass to root and its permissions to 640 so that only root can write it and the service account can read it. Use ls -l on the file and confirm the owner column reads root and the mode reads -rw-r----- in symbolic form. Compare these values with the expected ownership and permissions in the Wazuh agent enrollment troubleshooting guidance, which is the place to verify what Wazuh expects for this file. The step is done when the listing matches that guidance exactly.

  4. Restart the enrollment service

    Restart the Wazuh manager so the enrollment service (authd) reads the updated password file. Use the service manager on your platform, and check the service status and the manager log for a message showing that authd started without errors. Existing agents that are already enrolled keep their keys and are not affected by this change. The step is done when the service reports active and the log shows no startup failure related to the password file.

  5. Test enrollment from an approved host

    From a test endpoint that is meant to be allowed, install the Wazuh agent and supply the enrollment password through the deployment method you use, such as the WAZUH_REGISTRATION_PASSWORD deployment variable on Windows or the equivalent setting on other platforms. Confirm the agent appears as active in the manager's agent list. The step is done when the approved host enrolls and reports a connected state.

  6. Test refusal from an unapproved host

    From a second test endpoint, attempt enrollment without the password, or with a deliberately wrong value that you choose for this test only. The manager should refuse the registration, and no new agent should appear in the agent list. Review the manager log for the refusal entry so you can recognize it later. The step is done when the unapproved attempt is refused and nothing is added to the inventory.

  7. Record the verified state for audit

    Document the file path, owner, permissions, service restart time, the approved and refused test results, and the location of the authoritative password copy. Store this record with your change evidence so an assessor or internal reviewer can see the control and its test. Confirm the record names the person who will perform the next rotation. The step is done when the record is stored and an owner is named for rotation.

How to distribute the enrollment password through deployment variables

The WAZUH_REGISTRATION_PASSWORD deployment variable is the handoff point between your enrollment secret and the agents that use it. When an agent is installed with this variable set, the installer stores the value in the authd.pass file under /var/ossec/etc/, which is where the agent reads it during enrollment. On Windows, the same value is passed as a parameter to the installer package, so your deployment script or software distribution tool becomes part of the secret's path. Before you build the script, confirm the exact variable names and parameter syntax for each operating system in the Wazuh agent deployment variables for Windows page and the equivalent pages for Linux and macOS, since they are not identical across platforms.

Keep the value out of plain-text repositories. Store it in your secrets manager or the encrypted secret store of your configuration management tool, and inject it at deploy time so that it never appears in playbooks, PowerShell scripts, Group Policy objects, container images or CI logs. Mask it in pipeline output, and check that your tooling does not echo the installer command line into logs. Limit who can read the deployment tooling and the secret store to the team that runs agent rollouts, and log access to both. The same reader list should apply to hosts where the installer runs, because the file is readable by whoever can open authd.pass on the endpoint. Troubleshooting guidance expects this file to be owned by root with permissions 640, so confirm that your installer sets these values and that no later provisioning step widens them.

After a rollout, verify that the value reached agents from your configuration management rather than assuming it did. Sample a set of endpoints across each operating system and each deployment group, confirm that authd.pass exists with the expected owner and permissions, and confirm that newly installed agents enroll with the password in place. Record which configuration management job set the value and when, so that a later rotation can be traced. Then decide who owns the rotation process, how the new value is pushed to the secret store and to new installs, and how existing agents are handled during the change. Your Wazuh server and agent versions determine the exact behavior, so confirm both against the enrollment troubleshooting documentation before you finalize the procedure.

Security risks of a weak or leaked enrollment password

The enrollment password is a single shared secret that lets any host with the right value register as a Wazuh agent. The risks below come from how that secret is copied, stored, shared, rotated and reachable, so each card pairs a risk with a control you can check in your own environment.

Password copied to many endpoints

The password must sit on every host that enrolls, so one compromised endpoint can expose the value to anyone who reads its files or memory. An attacker holding it can enroll a rogue host that looks like a legitimate agent. Limit the exposure by keeping the password out of golden images and by confirming that only the deployment tool, not the endpoint's users, can read the file after enrollment.

Enrollment troubleshooting

Loose file permissions on authd.pass

The password is stored in authd.pass under /var/ossec/etc/. Wazuh troubleshooting expects this file to be owned by root with permissions 640. A world-readable or group-writable copy lets local users read or replace the secret. Check ownership and mode on the manager after every install or upgrade, and include the check in your configuration baseline.

Password shared in tickets or scripts

Enrollment passwords often travel through chat threads, tickets, wiki pages and copy-pasted deployment scripts. Each copy outlives the task that needed it and is rarely cleaned up. Store the value in your secrets manager or the deployment tool's variable store, and search your repositories and ticketing system for the literal value before you consider the password safe.

No rotation after staff change

When an engineer who knew the password leaves, or a build pipeline is retired, the value stays valid until someone changes it. Without a rotation schedule and an owner, the password becomes a permanent credential. Assign a named owner, record who holds copies, and rotate the password when people or pipelines change. Confirm the rotation steps in the Wazuh documentation for your version before you schedule them.

Reliance on the password without network restriction

A password alone does not limit where enrollment requests come from. If the manager accepts enrollment from any network, a stolen value works from anywhere. Pair the password with firewall rules that allow the enrollment port only from the subnets where endpoints live, and review those rules when you add networks. Treat the password as one layer, not the only control.

Enrollment service exposed beyond required networks

If the enrollment service is reachable from the internet or from user networks that do not need it, the password is tested by anyone who can reach the port. Expose the service only to the agent networks and to administrators who manage enrollment. Confirm the listening interface and firewall path from outside your segments, and check the port list in your Wazuh network design.

How to rotate the enrollment password without breaking enrollment

This sequence replaces the Wazuh agent enrollment password in a controlled window so that new hosts enroll with the new value, every change is traceable, and a rollback path exists if enrollment fails. It does not assume that already enrolled agents behave the same way, which you must confirm for your release.

  1. Plan the rotation window and inventory enrollment sources

    The security lead and the platform owner agree a change window and list every place the current enrollment password is used: the authd.pass file on the Wazuh server, the WAZUH_REGISTRATION_PASSWORD value in configuration management or deployment tooling, golden images, and any scripts or pipelines that enroll hosts. Confirm with your team who owns each source. The step is done when every source has a named owner and the window is approved in writing.

  2. Record the current state before changing anything

    Before any change, the server administrator copies the current authd.pass file to a secure, access-restricted backup location and notes its owner and permissions. Record the list of recently enrolled agents from the manager so you have a baseline for the enrollment check later. The step is done when the backup exists, its checksum or hash is recorded, and the baseline list is saved with the change ticket.

  3. Generate and store the new password

    The administrator generates a new, high-entropy enrollment password using an approved password manager or secrets tool and stores it in your secrets store, not in a shared document or chat. Keep the old value available only until the rollback window closes. The step is done when the new value is stored under a versioned name and access to it is limited to the people named in the change plan.

  4. Update authd.pass on the Wazuh server

    On the Wazuh server, the administrator writes the new password to the authd.pass file in /var/ossec/etc/, keeps the owner as root, and sets permissions to 640 as the Wazuh troubleshooting guidance expects. Then restart the manager service as your release documents for applying authd changes. The step is done when the file has the expected owner and permissions and the manager service is running without errors in its logs.

  5. Update the deployment variable source

    The automation owner changes the WAZUH_REGISTRATION_PASSWORD value in the deployment source, such as the Windows deployment command, Ansible or Puppet variables, or image build inputs, so that new installs present the new password. Check that no copy remains in plaintext in logs or repositories. The step is done when a test deployment definition resolves to the new value and a code or configuration review confirms no hard-coded copies of the old value remain.

  6. Test enrollment with a non-production host

    Enroll one test host using the new value and confirm it appears as a new agent on the manager. Then attempt enrollment with the old value and confirm it is refused, using the authd logs and the enrollment troubleshooting guidance to read the result. This check shows whether the rotation took effect on the server. The step is done when the new value succeeds and the old value is rejected, and both results are attached to the change ticket.

  7. Roll the new value to new enrollments and record the outcome

    Release the updated deployment source to new enrollment jobs, and track which hosts enroll during the window. Record each newly enrolled agent, its enrollment date and the password version used, which you can capture as a label in your deployment records because the password itself does not identify the version. Confirm with the vendor documentation for your release how existing enrolled agents are affected, since that behavior is a separate question from new enrollments. The step is done when the enrollment log matches the deployment log and open questions about existing agents have a documented owner.

  8. Close the window or roll back and retire the old value

    If enrollments fail, restore the backed-up authd.pass file, confirm its owner and permissions, restart the manager, revert the deployment variable, and retest with a test host. If enrollment succeeds, retire the old value from all stores and keep the change record. The step is done when a test enrollment succeeds under whichever value is active and the old value is either restored or removed from every source inventoried in step one.

How to monitor enrollment attempts after the password is set

Setting the enrollment password only helps if someone reviews what happens after it is in place. The first thing to watch is rejected enrollment attempts, because a host that presents the wrong password, or no password, shows up as a failed registration rather than as an agent. Those failures are the earliest sign that someone is trying to add an unknown host, or that a legitimate deployment script still carries an old value. Confirm where the Wazuh server writes authentication daemon (authd) messages in your version, usually under the server's log directory in /var/ossec/logs/, and confirm how those entries are surfaced in the dashboard before you build alerts on them.

The second check is new agents that nobody approved. Compare the agent list in the Wazuh dashboard and the output of the agent listing in the Wazuh API against the change records, deployment tickets and asset inventory your team already keeps. Any agent that enrolled outside a planned rollout window, under an unexpected name, or into a group nobody assigned deserves a review. Agent groups make this easier to triage because a host with no expected group membership stands out. Treat the agent inventory as the reconciliation source, so that every enrolled agent maps to a known asset owner.

The third check is changes to authd.pass. Monitor the file's owner, permissions and modification time on the manager, and confirm that file integrity monitoring or your configuration management tool records any edit. A change that nobody requested means the password may be exposed, so plan to rotate it and review enrollments made since the last known good state. Set a routine, for example a weekly review of failed enrollments and new agents plus a check of file state after each change window, and assign an owner for each step. Ask your team to confirm the review frequency against the risk and staffing of your environment.

Limits of an enrollment password and what to confirm

An enrollment password narrows who can register an agent, but it is one control among several. The cards below cover what it cannot prove, where its distribution depends on your tooling, and which behaviors you must confirm against the Wazuh version you run before you rely on it.

A shared password does not identify hosts

Every agent that enrolls with the password presents the same secret, so the manager learns that the request knew the password, not which machine sent it. Two hosts with the same secret are indistinguishable at enrollment. Check whether your agent names, group assignments and any IP restrictions are enough to tell a legitimate host from a copy of the password. Treat the password as a gate on registration, not as an inventory of trusted endpoints.

The password does not verify certificates

An enrollment password does not authenticate the manager to the agent or the agent to the manager. An attacker who can impersonate the manager on the network may still capture credentials offered during enrollment. Certificate-based verification is a separate control with its own CA setup and renewal work. Confirm which of these controls your deployment uses and document both, so reviewers do not assume the password covers identity verification.

Distribution depends on your tooling

How the password reaches each host depends on the installer path you use, such as the Windows deployment variables, Ansible, Puppet or a golden image. Each path can leave copies in shell history, configuration management data, package build logs or image layers. Ask who can read the source variables and the deployment logs, and confirm that the password is not written to shared repositories or templates.

Windows deployment variables

Rotation effects on enrolled agents

Changing the enrollment password affects new enrollments. Whether already enrolled agents keep working, need re-registration, or are affected at reconnect is a behavior to test in your own environment before you schedule a rotation. Build a test with one non-production agent, record the outcome, and write the rotation runbook from that result. Do not assume that a rotation is harmless to the running fleet.

Confirm behavior for your release

Enrollment behavior, file handling and troubleshooting guidance can change between patch releases in the 4.14 line. The release notes list six 4.14 patch releases in 2026, so a configuration verified on one patch may not match the next. Before you finalize the standard, read the notes for the exact version you run, repeat the enrollment test after each upgrade, and record the version next to the control in your evidence.

Wazuh release notes

Questions buyers ask before setting up enrollment passwords

How much effort does an enrollment password take for a small fleet versus a large one?

The configuration itself is small: one password, one file on the Wazuh server and one value passed to agent deployment. The effort grows with the number of places that hold the password and the number of deployment paths that must be updated. A small fleet that installs agents from one playbook or one image can usually be covered in a short change. A large fleet spread across several deployment tools, golden images, cloud launch templates and manual installs needs an inventory of every enrollment path before the first change. Ask your team or a partner to list each path that enrolls agents, because that list drives the effort more than the fleet size does.

What makes the work grow in a large or mixed environment?

Three factors drive most of the work:

  • Operating systems: Wazuh agents run on Linux, Windows, macOS, Solaris, AIX and HP-UX, and each platform has its own way of passing the enrollment value during installation. Windows deployments use the WAZUH_REGISTRATION_PASSWORD deployment variable, and other platforms need their own checks.
  • Deployment tooling: configuration management, imaging pipelines and manual scripts each store the password in a different place, and each must be updated and tested.
  • Change control: if agents enroll on production hosts, the change may need approval, a maintenance window and a rollback plan. These steps add time even when the technical change is simple.
Can an internal team set up enrollment passwords without outside help?

Usually yes, if the team already runs the Wazuh server and manages agent deployment. The core steps are to set the password on the server, store it in the authd.pass file with the expected ownership and permissions, pass it through deployment variables, and test enrollment on a small host group. The harder part is coverage: finding every enrollment path, confirming that existing agents keep working, and scheduling rotation without breaking new installs. Teams without a clear inventory of deployment tooling or without staff who can test changes on each operating system often find the verification work takes longer than the configuration.

What access and approvals does the work need from our side?

Plan for four things before work starts. First, administrative access to the Wazuh server to edit the authd.pass file and restart the enrollment service. Second, access to the deployment tooling that installs agents, such as the configuration management repository, image pipeline or endpoint management console. Third, a test group of hosts where enrollment can be checked without affecting production. Fourth, an approval path for the change, including who signs off on the new password and where it is stored, usually in a secrets manager. Confirm these with your security and platform owners early, since approval lead times often set the schedule more than the technical steps do.

How long does a first password rotation take, and what changes the timing?

No fixed duration can be given here, because it depends on the fleet, the number of deployment paths and the change windows your organization allows. A first rotation usually runs in stages: a test group, then a limited production group, then the rest of the fleet. Each stage needs time to watch enrollment logs and confirm that agents report in. Ask any provider for a schedule built from your inventory of hosts and paths, with named checkpoints and a rollback step, rather than a single estimate. Keep in mind that the Wazuh release line receives patch releases roughly every one to two months, so schedule rotation work so it does not collide with server upgrades.

When is an outside partner worth the cost for enrollment password work?

A partner is worth considering when the fleet spans several operating systems, enrollment runs through more than one deployment tool, or change control requires evidence that each enrollment path was tested. It is also useful when the internal team is short on time or lacks the Wazuh server experience to confirm that the password, file ownership and agent configuration match. DeployOpen implements self-hosted open-source platforms inside your own infrastructure and works from a written, fixed scope with agreed deliverables. Ask any partner for a quote tied to a written scope, what they will test, what evidence you will receive, and what happens if a rotation must be rolled back. Note that DeployOpen prepares systems and evidence for compliance assessments but does not issue audit reports.

How DeployOpen scopes and delivers enrollment hardening

DeployOpen starts enrollment hardening with a written scope agreed before any change is made to the Wazuh environment. The scope names the Wazuh server and any cluster nodes involved, the operating systems and deployment tools that install agents, and the people who approve changes. Before work begins, the team reviews how agents are enrolled today: whether an enrollment password is already set, where the password is stored and who can read it, which deployment variables or scripts pass it to endpoints, and whether any host can enroll without it. That review tells the client which hosts are affected and which deployment pipelines need changes, so the rollout does not break agents that are already reporting.

Configuration happens inside the client's own infrastructure, in the client's accounts, data centers or air-gapped networks. DeployOpen sets the enrollment password on the server side, confirms that the authd.pass file has the expected owner and permissions, and updates the deployment variables and automation that distribute the password to new endpoints. Testing then checks the outcome that matters: an unapproved host that attempts enrollment without the correct password is refused, while an approved host still enrolls and reports. Each test result is recorded so the client can see what was tried and what happened. The delivered documentation is written for the operations team and covers how to rotate the password, how to add the password to a new deployment pipeline, and what to check when an enrollment fails.

Ongoing support and retesting are available as retainers. A retainer suits clients who rotate the enrollment password on a schedule, add new endpoint groups often, or change the deployment tooling that carries the password. Retesting after those changes confirms that enrollment still refuses unapproved hosts. Clients should ask for the written scope to name who approves password changes, how the new password reaches approved deployment systems, and which evidence will be handed over at the end of the work. Confirm with the team that owns your deployment tooling which systems will receive the password, because those systems become the places where it must be protected.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.