{"result":{"depiction_url":null,"edges":{"hasreference":{"objects":[{"created":"2026-10-07T11:13:44Z","object_id":{"id":2045,"is_a":["text","documentation","userguide"],"name":"doc_userguide_user_management","title":{"_type":"trans","tr":{"en":"Creating a user"}},"uri":"https:\/\/zotonic.com\/id\/2045"},"seq":1},{"created":"2026-10-07T11:13:44Z","object_id":{"id":2933,"is_a":["text","documentation","developerguide"],"name":"developer_inspect_configuration","title":{"_type":"trans","tr":{"en":"Inspect global and site configuration"}},"uri":"https:\/\/zotonic.com\/id\/2933"},"seq":2}],"predicate":{"id":2774,"is_a":["meta","predicate"],"name":"hasreference","title":{"_type":"trans","tr":{"en":"Documentation reference"}},"uri":"https:\/\/zotonic.com\/id\/hasreference"}},"references":{"objects":[{"created":"2020-05-30T05:48:20Z","object_id":{"id":1527,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_sites","title":{"_type":"trans","tr":{"en":"Create your first site"}},"uri":"https:\/\/zotonic.com\/id\/1527"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"subject":{"objects":[{"created":"2026-10-07T11:13:44Z","object_id":{"id":2558,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_troubleshooting","title":"Troubleshooting","uri":"https:\/\/zotonic.com\/id\/2558"},"seq":1},{"created":"2026-10-07T11:13:44Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-10-07T11:13:44Z","object_id":{"id":2590,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_authentication","title":"Authentication","uri":"https:\/\/zotonic.com\/id\/2590"},"seq":3},{"created":"2026-10-07T11:13:44Z","object_id":{"id":2589,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_identity_and_accounts","title":"Identity and accounts","uri":"https:\/\/zotonic.com\/id\/2589"},"seq":4},{"created":"2026-10-07T11:13:44Z","object_id":{"id":2670,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_erlang_otp","title":"Erlang\/OTP","uri":"https:\/\/zotonic.com\/id\/2670"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1598,"is_a":["text","documentation","cookbook"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1598"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_cookbook_shell_resetpassword","page_url":{"en":"https:\/\/zotonic.com\/cookbook\/1598\/reset-a-user-password-from-the-shell","x-default":"https:\/\/zotonic.com\/cookbook\/1598\/reset-a-user-password-from-the-shell"},"preview_url":null,"resource":{"body":{"_type":"trans","tr":{"en":"<p>Prefer the normal password-reset flow or the admin user-management screen. For a trusted administrator recovering a <strong>normal user account<\/strong>, connect with <code>bin\/zotonic shell<\/code> and choose the correct site:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">C = z:c(garden).\nUserId = m_rsc:rid(alice_person, C).\nm_rsc:p(UserId, title, C).\n<\/code><\/pre>\n<p>Confirm the person&#39;s identity and username in admin. Then use <code>m_identity:set_username_pw(UserId, Username, NewPassword, C)<\/code>, with binary values for the verified username and a new strong password. Check for <code>ok<\/code>; do not claim success on an error. Never use this to grant a username to an unrelated resource. Avoid recording the password in shared transcripts; the shell or terminal may retain input history.<\/p>\n<p>The special <code>admin<\/code> login (resource 1) is controlled by the site&#39;s <code>admin_password<\/code> configuration. Change that at its owning configuration layer and follow the deployment&#39;s restart procedure; a normal identity update is not a substitute.<\/p>\n<p>Test the login privately, then press <strong>Ctrl-C twice<\/strong> to leave the remote shell.<\/p>"}},"category_id":{"id":318,"is_a":["meta","category"],"name":"cookbook","title":{"_type":"trans","tr":{"en":"Cookbook"}},"uri":"https:\/\/test.zotonic.com\/id\/318"},"content_group_id":{"id":339,"is_a":["meta","content_group"],"name":"default_content_group","title":{"_type":"trans","tr":{"en":"Default Content Group"}},"uri":"https:\/\/zotonic.com\/id\/default_content_group"},"created":"2020-05-30T05:47:27Z","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"doc_editorial_bundle":true,"doc_editorial_edges":{"hasreference":[2045,2933],"subject":[2558,2564,2589,2590,2670]},"github_url":"https:\/\/github.com\/zotonic\/zotonic\/tree\/master\/doc\/cookbook\/shell-resetpassword.rst","is_authoritative":true,"is_dependent":false,"is_featured":false,"is_protected":false,"is_published":true,"is_unfindable":false,"language":["en"],"modified":"2026-10-07T11:13:54Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"name":"doc_cookbook_shell_resetpassword","pivot_geocode":null,"pivot_location_lat":null,"pivot_location_lng":null,"privacy":0,"publication_end":"9999-06-01T00:00:00Z","publication_start":"2022-02-15T10:01:33Z","slug":"reset-a-user-password-from-the-shell","summary":{"_type":"trans","tr":{"en":"Reset a normal user identity when the usual recovery flow cannot be used."}},"title":{"_type":"trans","tr":{"en":"Reset a user password from the shell"}},"title_slug":{"_type":"trans","tr":{"en":"reset-a-user-password-from-the-shell"}},"tz":"UTC","uri":null,"version":35,"visible_for":0},"uri":"https:\/\/zotonic.com\/id\/1598","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1598"}},"status":"ok"}