YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
84 stars 34 forks source link

Change password - private instance #342

Closed przemyslawwilde closed 1 year ago

przemyslawwilde commented 1 year ago

In relation to the problem

When attempting to change my email, I go to the /auth/edit page, type in the new email I want, along with my current password, and click Save Changes. The result is the error message below. I'm not sure if this is intentional, or if it's related to the SSO features of Yunohost. The password is surely correct in this case.

image

Context

I am using Mastodon 3.5.1 installed via Yunohost 4.3.6.3 on Debian 10.

Good evening I also have this problem. I received a message that my password is incorrect. Is there any way to change it? I can log in to my account correctly, but I can't change my password because I'm getting the information that it is incorrect.

mastodon

Mastodon | 3.5.3 on Debian 11 | YunoHost 11.0.10.2 (stable)

_Originally posted by @przemyslawwilde in https://github.com/YunoHost-Apps/mastodon_ynh/issues/323#issuecomment-1304912741_

przemyslawwilde commented 1 year ago

Changed by console.

wolfskaempf commented 1 year ago

Changing it by console also helped me, because otherwise I would not have been able to migrate my account off of my YunoHost instance.

In case anyone finds this via search, here's how you do that, since tootctl isn't usable without some shenanigans.

SSH into your YunoHost instance as admin (ssh admin@youryunohostinstance.example.com) and become root by running sudo -i.

Save the below script somewhere as tootctl.sh and make it executable with chmod +x tootctl.sh.

#!/bin/bash
cd /var/www/mastodon/live && PATH=/opt/rbenv/versions/mastodon/bin:/opt/rbenv/shims:/opt/rbenv/bin:/opt/node_n/n/versions/node/12/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  RAILS_ENV=production bin/tootctl "$@"

Now you can easily use tootctl by calling ./tootctl.sh instead. To get to know the options run ./tootctl.sh --help.

To reset your account's password run ./tootctl.sh accounts modify USERNAME --reset-password after replacing USERNAME with your instances username, e.g. replace it with tom if your full username was @tom@social.example.com.

Hope this helps!

franckhomer commented 1 year ago

Hello,

I tried but with the new password i can't connect the account. with the user name or the user. command and result _bash ./tootctl.sh accounts modify Marcel_Picon --reset-password OK New password: 76315xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ but on my mastodon instance "email or password uncorrect" Have you an idea ?

Thanks

badrihippo commented 1 year ago

Just a guess, but if the login is controlled by LDAP (as mentioned in #323) doesn't that mean the password would be controlled by LDAP too? So if you want to change your username or password, you should do them in YunoHost settings (which will be propagated here) instead of trying to change them here directly.

Changing passwords directly would make sense in cases where you're trying to move off YunoHost like @wolfskaempf was doing. But otherwise, it's going to be integrated via LDAP to the rest of YunoHost.

(Again, this is just an educated guess; please confirm if I'm right or correct me if I'm wrong)

panomaki commented 1 year ago

What @badrihippo says is correct. Login is controlled by Yunohosts LDAP by default. This also means passwordmanagement should be done through Yunohost user profile settings.

To disable this feature, change LDAP_ENABLED to falsein /var/www/mastodon/live/.env.production

yalh76 commented 1 year ago

What @badrihippo says is correct. Login is controlled by Yunohosts LDAP by default. This also means passwordmanagement should be done through Yunohost user profile settings.

To disable this feature, change LDAP_ENABLED to falsein /var/www/mastodon/live/.env.production

yep exactly