> For the complete documentation index, see [llms.txt](https://docs.oceanenterprise.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oceanenterprise.io/operational-guidelines/user-directory-management/updating-user-password.md).

# Updating User Password

### Overview

Passwords can be set by an Administrator or changed by the user through the `oe-recovery` flow.

For detail-oriented flow illustration, please consult [Sequence Flow](#sequence-flow).

### Procedure

**Administrator initiated**

1. Navigate to **Directory → Users** and select the user.
2. Select **Set password** to set it directly, or **Create Recovery Link** to let the user choose their own password.

<figure><img src="https://1789397093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH0zpgrXbeZ7u6UuCV9Gz%2Fuploads%2FlT9b8lWIMtuwEkIZQazm%2FScreenshot%202026-09-09%20at%2002.53.44.png?alt=media&amp;token=c4ba630e-85a9-4f3a-8cf6-a02b7c41c0b0" alt=""><figcaption></figcaption></figure>

1. Deliver the password or the link.

**User initiated**

1. The user selects **Forgot username or password?** on the login form.

<figure><img src="https://1789397093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH0zpgrXbeZ7u6UuCV9Gz%2Fuploads%2F865XdMsozhzBL6YqKEVq%2Fimage.png?alt=media&amp;token=3ff930d1-d368-47cb-9b0b-6f9e4a3f3569" alt="" width="375"><figcaption></figcaption></figure>

1. The user opens the link from the recovery email and sets a new password.

### Verification

* The user can authenticate with the new password.

### Notes

* The password policy requires at least 8 characters. It applies to the recovery and password change flow, not to the enrollment prompt.
* The recovery token is valid for 30 minutes, with a maximum of 5 recovery attempts.
* Recovery email delivery requires the `AUTHENTIK_EMAIL__*` variables to be configured.
* Prefer **Create Recovery Link** over **Set password**, so that the administrator never handles the user's password.

### Appendix

#### Sequence Flow

```mermaid
sequenceDiagram
    actor OA as Administrator
    participant UI as Authentik<br>Service
    participant PG as Authentik<br>Database
    participant SMTP as SMTP Server
    actor U as Directory User

    alt Administrator sets the password or issues a recovery link
        OA->>UI: Open the user and select Set password or Create Recovery Link
        UI->>PG: Save the new password or store a single-use recovery token
        UI-->>OA: Confirmation or recovery link
        OA-->>U: Deliver the password or the link out-of-band
    else User starts the recovery himself
        U->>UI: Select Forgot username or password and provide the identifier
        UI->>PG: Store a single-use recovery token
        UI->>SMTP: Send the recovery email
        SMTP-->>U: Recovery email with the single-use link
        U->>UI: Open the recovery link
    end

    U->>UI: Provide the new password twice
    UI->>UI: Validate the password against the password policy
    UI->>PG: Save the new password and remove the used token
    PG-->>UI: Password updated
    UI-->>U: Password changed, return to the login form
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.oceanenterprise.io/operational-guidelines/user-directory-management/updating-user-password.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
