# Runbook: Owner Account Recovery **Locked out with zero working owner accounts** (all deactivated, forgot the only owner's password, etc.): ```bash ssh rootnode-deploy@rn-platform-01 docker exec -it rootnode-platform-api-1 sh node bootstrap-owner.js you@example.com "Your Name" # bootstrap-owner.js refuses to run if an active owner already exists UNLESS the target email # belongs to an EXISTING instructor row — in that case it promotes them to owner. Point it at # any known instructor email to recover through them, or a brand-new email to create a fresh # owner outright if the instructors table itself is in an unknown state. ``` **Forgot password, account still active and you have SSH access:** ```bash docker exec -it rootnode-platform-postgres-1 psql -U rootnode_platform -c \ "SELECT instructor_id, email, role, status FROM instructors WHERE role='owner';" # Then use another owner's account to reset via /admin -> Instructors -> [account] -> Reset # Password, OR re-run bootstrap-owner.js targeting that email (also resets the password). ``` **Never** hand-edit `password_hash` in the database — it's `scrypt(salt):hash` in a specific format (`platform/api/src/auth/password.js`); a malformed value just breaks login rather than setting a usable password. Always go through `bootstrap-owner.js` or the admin UI's reset flow.