Reset user password by Admin

Hello,

I have had an issue with a user and he is unable to reset his password due to some mail issues. I wanted to reset his password or email from admin section but I don’t find the option. Kindly let me know how to solve this issue.

One option is to ask him to create a new account, then I change the ownership of his topics to a different user but that’s a creepy method. We should have a better way to handle this right?

Regards,
Rahul

7 Likes

Here is how I do it.

1 Like

Do you know what the email issues are? Is he not receiving the emails? are they going to spam? can he not click on the password reset link in his email?

The “best” way to reset the password is for him to use the forget password and receive an email.

1 Like

He is having issue with his registered mail account and hence unable to reset. He is asking me to reset his password. That’s all. No offence, but I think the admin should have the ability to reset it to a temporary password that expires in a day.

3 Likes

There is no user interface for an admin to reset a password, but you can through the rails console/database access.

1 Like

Can you tell how to do that from the server shell?

First of all I would be very careful, and also backup your db.

ssh into your server
cd /var/discourse
./launcher enter app
rails c
u = User.find_by_email('email@test.com')
u.password='zKRR6vTZKvJAB84V9jdgeydS'
u.save!
ctrl+d to exit

I still think the user should figure out their email issues first though, so that they can just do a normal password reset, or change their email address for them.

19 Likes

If you have email issues your site is doomed: nobody will be able to sign up, get notifications, etc.

4 Likes

I don’t have issues with forum mailing system. I am using SparkPost and it works great. The problem was with users mail provider which is none of my concern directly. He is receiving the activation mail but unable to login to the web client.

Well I have resolved the issue anyway. Thank you everyone and especially @blake I learned something new :slight_smile:

5 Likes

8 posts were split to a new topic: Send password reset emails in bulk?