Issues with changing email/username used on scanlines

a couple of people ( @pixelflowers @hypermosh ) have had issues (mostly on videos.scanlines.xyz) when they change the email or username used on the main scanlines forum

this is due to the way single sign on works and the lack of flexibility to change user info on peertube (which i think is due to potential account hijacking if username changes on activtypub namespaces)

i think it is possible to resolve these problems by making some changes in the database - although havnt got around to looking into it just yet - this topic is a note to self to look into this soon - and to document the process in this thread once i figure it out so other admins can resolve these requests too when they come up

3 Likes

how to change email for user on peertube

  • first ssh into the peertube machine (need to know ip and password for this - ssh root@<ip-address>)
  • enter postgres sudo -u postgres psql
  • connected to db: \l to list dbs, \c peertube_prod to connect
  • \d to see tables , \d user to see columns for the user table
  • UPDATE "user" SET email = '<new email>' WHERE "username" = '<user>';

note: the email and username must match across all scanlines accounts (forum, chat, videos)

email and username can be changed on forum and chat by admin in the ui

1 Like

(risky) how to change username for user on peertube:

i poked around at how one might change the username by updating various fields in the database - note: this will break things - in particular federation - so if this account has subscribers etc already they might be lost

other things could break too although from my tests seems to be working more or less - can always reverse this process if it becomes problem

  • enter into the machine, start postgres, connect to db as above
UPDATE "account" SET "name" = '<new-name>' WHERE "name" = '<old-name>';

UPDATE "actor" SET "preferredUsername" = '<new-name>', "url"='https://videos.scanlines.xyz/accounts/<new-name>', "inboxUrl"='https://videos.scanlines.xyz/accounts/<new-name>/inbox', "outboxUrl"='https://videos.scanlines.xyz/accounts/<new-name>/outbox', "followersUrl"='https://videos.scanlines.xyz/accounts/<new-name>/followers', "followingUrl"='https://videos.scanlines.xyz/accounts/<new-name>/following' WHERE "preferredUsername" = '<old-name>';

UPDATE "user" SET username = '<new-name>' WHERE "username" = '<old-name>';

(updating account table - first line above - might not be needed as this is the display name which user can set themself)

1 Like