Files
coder/docs/admin/users/password-auth.md
T
Jakub Domeracki b4fb7901e6 docs: clarify that disable-password-auth also applies to owners (#30362)
The `--disable-password-auth` help text says owners can still sign in
with a password "to avoid potential lock out", and a comment in
`coderd/userauth.go` says the same. Neither is true. #6193 removed the
owner bypass on purpose, so the flag blocks password login for everyone.
The recovery advice was also wrong. It named a command that doesn't
exist (`create-admin`), and any admin that `create-admin-user` creates
while the flag is on still can't sign in.

This PR changes docs and comments only:
- Rewrites the flag description to say it applies to owners too and how
to recover access. Regenerated the CLI and config reference docs and the
golden files.
- Fixes the misleading comment in `coderd/userauth.go`.
- Adds the same warning and recovery steps to
`docs/admin/users/password-auth.md`.

> [!NOTE]
> Generated by Coder Agents on behalf of @jdomeracki-coder.
2026-10-07 19:03:46 +02:00

1.3 KiB

title
title
Password authentication

Coder has password authentication enabled by default. The account created during setup is a username/password account.

Disable password authentication

To disable password authentication, use the CODER_DISABLE_PASSWORD_AUTH flag on the control plane.

This blocks password sign-in and password resets for all users, including owners. Before you enable it, make sure at least one owner can sign in through your identity provider.

Restore the Owner user

If you remove the admin user account (or forget the password), you can run the coder server create-admin-usercommand on your server. If password authentication is disabled, unset CODER_DISABLE_PASSWORD_AUTH and restart the server first, or the new admin will not be able to sign in.

Important

You must run this command on the same machine running the control plane. If you are running Coder on Kubernetes, this means using kubectl exec to exec into the pod.

Reset a user's password

An admin must reset passwords on behalf of users. This can be done in the web UI in the Users page or CLI: coder reset-password