Werk #19630: Run as local group failed under a strict password policy
| Component | Checks & agents | ||||||
| Title | Run as local group failed under a strict password policy | ||||||
| Date | Nov 24, 2026 | ||||||
| Level | Trivial Change | ||||||
| Class | Bug Fix | ||||||
| Compatibility | Compatible - no manual interaction needed | ||||||
| Checkmk versions & editions |
|
The Windows agent creates a temporary local user when a plug-in is
configured to run as a local group. The password of that user was always
12 characters long. If the account policy of the machine demanded a
longer minimum password, Windows refused to create the account. The
agent logged Can't add user '...' status = 4 and then ran the plug-in
under its own account instead of the restricted temporary user, so the
intended privilege separation did not apply.
Starting with this release, the agent reads the minimum password length from the local account policy and uses it, and never generates a password shorter than 20 characters. The password is also assembled from upper case letters, lower case letters, digits and special characters, so that it meets the Windows password complexity requirement. A custom password filter can demand more than the account policy reports, and Windows does not say so.
If the temporary user still cannot be created, the agent runs the
plug-in under its own account, with the privileges of the agent, rather
than skipping it. This is unchanged, and it also applies when the user
creation fails for any other reason. The Windows error code is recorded
in the agent log, in a line that starts with Error adding user.