Skip to content

Commit f35413c

Browse files
Clarify that --user/--group are optional on Linux/macOS
- Update note to explain --user and --group are optional on Linux/macOS - Clarify that if --user is omitted, default elastic-agent-user is used - Clarify that if only --group is specified, agent runs under default user - Update example text in both install and unprivileged command tabs Co-authored-by: vishaangelova <[email protected]>
1 parent da74d8a commit f35413c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

reference/fleet/elastic-agent-unprivileged.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ This functionality is in technical preview and may be changed or removed in a fu
189189
In certain cases you may want to install {{agent}} in `unprivileged` mode, with the agent running as a pre-existing user or as part of a pre-existing group. For example, on a Windows system you may have a service account in Active Directory and you’d like {{agent}} to run under that account.
190190

191191
::::{note}
192-
The `--password` parameter is only required on Windows. On Linux and macOS, specifying the `--user` and/or `--group` parameters is sufficient.
192+
The `--password` parameter is only required on Windows. On Linux and macOS, the `--user` and `--group` parameters are optional:
193+
194+
* If you omit `--user`, {{agent}} uses (or creates) the default unprivileged user (`elastic-agent-user`).
195+
* If you specify only `--group`, the agent runs unprivileged under its default user but with the requested group.
193196
::::
194197

195198
To install {{agent}} in `unprivileged` mode as a specific user or group, use the following commands:
@@ -198,19 +201,19 @@ To install {{agent}} in `unprivileged` mode as a specific user or group, use the
198201

199202
::::{tab-item} Linux/macOS
200203

201-
To install as a specific user:
204+
To install with a specific user (optional—if omitted, the default `elastic-agent-user` is used):
202205

203206
```shell
204207
sudo elastic-agent install --unprivileged --user="username"
205208
```
206209

207-
To install as part of a specific group:
210+
To install with a specific group (the agent runs under its default user with the specified group):
208211

209212
```shell
210213
sudo elastic-agent install --unprivileged --group="groupname"
211214
```
212215

213-
To install as a specific user and group:
216+
To install with both a specific user and group:
214217

215218
```shell
216219
sudo elastic-agent install --unprivileged --user="username" --group="groupname"
@@ -244,13 +247,13 @@ Alternatively, if you have {{agent}} already installed with administrative privi
244247

245248
::::{tab-item} Linux/macOS
246249

247-
To change to a specific user:
250+
To change to a specific user (optional—if omitted, the default `elastic-agent-user` is used):
248251

249252
```shell
250253
sudo elastic-agent unprivileged --user="username"
251254
```
252255

253-
To change to a specific group:
256+
To change to a specific group (the agent runs under its default user with the specified group):
254257

255258
```shell
256259
sudo elastic-agent unprivileged --group="groupname"

0 commit comments

Comments
 (0)