Skip to content

Keep the isolated user's password so Steam stays signed in - #52

Merged
mlopezsegura merged 1 commit into
masterfrom
fix/isolated-password-keep
Nov 14, 2026
Merged

mlopezsegura merged 1 commit into
masterfrom
fix/isolated-password-keep

Conversation

@mlopezsegura

@mlopezsegura mlopezsegura commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the Steam part of #11: in isolated sessions Steam remembered the account but asked for the QR code or the password every time.

Cause

Every session start, and every RDP reconnect (resolution change, local seat, mosaic), IsolatedUserManager.EnsureUser gave the osms-… user a new random password with NetUserSetInfo (level 1003). That is an administrator reset, and resetting the password of a local account makes its DPAPI master keys unreadable. Steam keeps its sign-in token in local.vdf encrypted with DPAPI: the account stayed in loginusers.vdf, but the token could no longer be decrypted. Browser passwords saved in those sessions were lost the same way. With a regular local account (never reset), the sign-in was kept, which matches what was reported in the issue.

Fix

  • The password is stored as a local LSA secret (L$OpenStreamMS_<user>, readable only by SYSTEM) — Core/Helpers/IsolatedUserSecret.cs.
  • When the user already exists, the stored password is reused if it still works (network LogonUser, no profile or session); it is only reset when there is no secret or it no longer matches.
  • The secret is deleted together with the user.
  • Logs say "password kept" instead of "password rotated"; new texts in the 22 backend catalogs.

After updating, each isolated session needs one last Steam sign-in (the current token was encrypted with keys that are already lost); from then on it stays signed in.

Testing

  • Builds; C# tests (42) and i18n tests (38) pass.
  • Not yet tested on a machine with the service installed (the LSA secret needs SYSTEM).

🤖 Generated with Claude Code

Every session start (and every RDP reconnect) reset the osms-* user's
password with NetUserSetInfo. An admin reset of a local account makes its
DPAPI keys unreadable, so Steam remembered the account but asked for the
QR code or password every time (issue #11), and browser passwords were lost.

The password is now stored as a local LSA secret (L$OpenStreamMS_<user>,
SYSTEM only) and reused while it still works; it is only reset when there
is no secret or it no longer matches. The secret is deleted with the user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mlopezsegura
mlopezsegura merged commit 2030f45 into master Nov 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant