elastic / elastic/elastic-agent

`Failed to set user elastic-agent-user password for service` while installing unprivileged agent on Windows enrolled in Active Directory.

Open
#11,248 7 comments 0 reactions 0 assignees View on GitHub
bug impact:high Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
275
Forks
264
Avg merge
1d 23h
Merged PRs (30d)
312

Description

**Kibana version:**
```
VERSION: 9.3.0-SNAPSHOT
BUILD: 93303
COMMIT: 07655a0a20808401ae4531541ed85885b2f61fea
Artifact: https://snapshots.elastic.co/9.3.0-05c2ec24/downloads/beats/elastic-agent/elastic-agent-9.3.0-SNAPSHOT-windows-x86_64.zip
```

**Preconditions:**
1. 9.3.0-SNAPSHOT Kibana cloud environment should be available.
2. Active Directory should be setup.
3. Windows Server 2025 should be available and should be connected to Active Directory.

**Steps to reproduce:**
1. Run elastic-agent install command using --unprivileged flag.
2. Observe elastic-agent failed to install and below error is observed:
`Error: error installing package: error getting service installation options: failed to set user elastic-agent-user password for service: call to NetUserSetInfo failed: status=2221 error=0`

**Expected behavior:**
Elastic agent should be installed using `--unprivileged` on Windows enrolled with Active Directory.

**Screen Capture:**

Image
Image

**Linked Feature ticket:**
https://github.com/elastic/elastic-agent/issues/11079

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the elastic-agent install command with --unprivileged on Windows Server 2025 joined to Active Directory, using the 9.3.0-SNAPSHOT details in the issue. Review the linked feature ticket #11079 and trace the reported NetUserSetInfo status 2221 failure; done means unprivileged installation succeeds in this environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.