# How to reset admin password from ruby cli?

**URL:** https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82
**Category:** Technical assistance
**Created:** [December 1, 2017, 10:03am UTC](https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82 "2017-12-01T10:03:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anon1393767](https://community.zammad.org/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@anon1393767](https://community.zammad.org/u/anon1393767)
#### Post date: [December 1, 2017, 10:03am UTC](https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82/1 "2017-12-01T10:03:48Z")

</div>

How to reset admin password from ruby cli ? Or maybe there are some examples or how to change password from database?

---

<div class="post-metadata">

### Author: ![anon29869905](https://community.zammad.org/letter_avatar_proxy/v4/letter/a/b782af/32.png) [@anon29869905](https://community.zammad.org/u/anon29869905)
#### Post date: [December 2, 2017, 10:14am UTC](https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82/2 "2017-12-02T10:14:06Z")

</div>

Hi @anon1393767 - Just enter the [Zammad Rails console](https://docs.zammad.org/en/latest/admin-console.html#start-zammad-s-rails-console) and run `User.find_by(email: '*your_email*').update!(password: '*your_new_password*')` - e.g. `User.find_by(email: 'user@example.com').update!(password: 'Zammad-happy_password_!!!123')`

---

<div class="post-metadata">

### Author: ![anon1393767](https://community.zammad.org/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@anon1393767](https://community.zammad.org/u/anon1393767)
#### Post date: [December 4, 2017, 3:07pm UTC](https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82/3 "2017-12-04T15:07:29Z")

</div>

Can I see all users from console? How to do this - maybe you know?

---

<div class="post-metadata">

### Author: ![anon1393767](https://community.zammad.org/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@anon1393767](https://community.zammad.org/u/anon1393767)
#### Post date: [December 4, 2017, 3:09pm UTC](https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82/4 "2017-12-04T15:09:30Z")

</div>

User.all =)  
I find those command! Thanks!

---

<div class="post-metadata">

### Author: ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)
#### Post date: [January 3, 2018, 3:13pm UTC](https://community.zammad.org/t/how-to-reset-admin-password-from-ruby-cli/82/5 "2018-01-03T15:13:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
