snail​huddle: WLYBSMWAI password resets

If you lock yourself out of WLYB­SMWAI, an admin can let you back in.

Posted [2023-03-08 Wed] by @wrul

Hey folks,

It’s now possible to revive your access to We Loved Your Book So Much We Ate It, in the event you lose your login details. Basically: you can ask a snailhuddle admin to help you back in 🙂

To mark this exhilarating development, here’s the lie of the WLYBSMWAI login land, for anyone who would like more information…

One way admins can reset a password:

  1. Confirm request has come from actual person it’s meant to’ve.
  2. Enter their registered “email address” into the form at https://book.snailhuddle.org/password-reset/ and submit it. Give BookWyrm a moment to recuperate (from the effort of it not actually sending any email). It’s a tough life, hey?
  3. From command line, log in to server “ipomoea.snailhuddle.org” — e.g:

    ssh ipomoea
    
  4. Scry database, as system user “bookwyrm”:

    sudo -u bookwyrm psql
    
  5. Consult table of users, to find this person’s user number:

    SELECT id, localname, name, email
    FROM bookwyrm_user
    WHERE local = 't'
    ORDER BY localname;
    
  6. Look for the reset code currently assigned to that particular user number:

    SELECT * from bookwyrm_passwordreset;
    

    Alternatively, skip these last couple of steps and instead refer to a friendly summary, given by a single monstrosity of a SQL command such as:

    SELECT bookwyrm_user.localname, bookwyrm_passwordreset.code AS reset_code, bookwyrm_passwordreset.expiry, bookwyrm_user.email
    FROM bookwyrm_passwordreset RIGHT OUTER JOIN bookwyrm_user ON (bookwyrm_user.id = bookwyrm_passwordreset.user_id)
    WHERE bookwyrm_user.local = 't'
    ORDER BY bookwyrm_passwordreset.expiry;
    
  7. Provide your patient correspondent with their reset link — that is their reset code tacked directly onto the end of https://book.snailhuddle.org/password-reset/
  8. Leave database and log out of server:

    \q
    exit
    

Happy coming and going, everyone! Maybe it’s time to read something more fun? 😉