# I entered the wrong admin email address during initial setup

**URL:** https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241
**Category:** Self-hosting
**Created:** [November 15, 2017, 1:31pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241 "2017-11-15T13:31:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 15, 2017, 1:31pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/1 "2017-11-15T13:31:39Z")

</div>

I have a couple of test sites running Discourse just with IP’s at present and I have been testing Elastic Email (EE).

Seems ok so far but I haven’t done the domain verification SPF stuff yet.

I want to change the admin email address but it’s an email address that is being “suppressed”, not bounced by EE. So I am not receiving the verification notices to change the email address (or set up new admins etc).

I have manually created another admin where the email address is getting through EE and tried to change the email address of the “broken” admin via their preferences (rather than admin section). It allows me to change the address but it’s sending out a request to the suppressed email account for verification of the change.

How do I complete the verification?

Is there a process in rails or a hack of the database I can do? I don’t want to kill the admin as they have posts on the site that it will affect.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 15, 2017, 5:35pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/2 "2017-11-15T17:35:11Z")

</div>

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/271):
>
> How do I complete the verification?

Any thoughts on how to validate an incorrect email address?

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 3:10am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/3 "2017-11-17T03:10:03Z")

</div>

As main admin I’m still unable to validate the incorrect email address I used when I created the Discourse site.

What is the hack to validate the email so I can then go on and enter the correct email address?

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [November 17, 2017, 3:15am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/4 "2017-11-17T03:15:56Z")

</div>

You are probably out of luck if you screw up the admin email… Probably the one thing in discourse that you can’t screw up, as the admin controls everything and your only way to recover an admin password is thru its email…

EDIT: Maybe a ninja here can teach you how to modify the database record directly… The email is stored in a simple table.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 3:18am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/5 "2017-11-17T03:18:19Z")

</div>

@schungx yes I guess I’m looking for a Discourse db Ninja. Maybe Google can help me find the Ninja.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 3:21am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/6 "2017-11-17T03:21:32Z")

</div>

Google brings up this thread [How to access the discourse database?](https://meta.discourse.org/t/how-to-access-the-discourse-database/41845)  
Bit short on details but I will work through it until a **real** Ninja comes along.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [November 17, 2017, 3:22am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/7 "2017-11-17T03:22:13Z")

</div>

I am sure you can simply go into rails console and execute a rails command to change it, just like changing all other types of user settings that you can search here on meta.

Email is a bit tricky as it is moved out into a separate table a while ago so some of the old tricks won’t work.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 3:23am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/8 "2017-11-17T03:23:49Z")

</div>

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/284):
>
> so some of the old tricks won’t work

I did wonder about the ongoing changes to Discourse.

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/284):
>
> execute a rails command to change it

I have no rails experience at all.

Does anyone know the command line fix?

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [November 17, 2017, 3:24am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/9 "2017-11-17T03:24:08Z")

</div>

Or, try to go into rails console and send yourself an invitation with the admin group.

Or register a normal user, then use the rails console to make that user an admin.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 3:33am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/10 "2017-11-17T03:33:00Z")

</div>

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/286):
>
> Or register a normal user, then use the rails console to make that user an admin.

I have done this so I have a second fully operational admin account but really I need the original one to work as that one created all the categories and topics etc.

I know there is the facility to switch posts from one user to another and I could become admin2 but that seems quite tedious.

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/286):
>
> Or, try to go into rails console and send yourself an invitation with the admin group.

Even if I knew how to do this the invite will not get through the spam filters. The email address I entered is actually valid but maybe because Discourse is trying to send validation from [thisDomain.com](http://thisDomain.com) to [me@thisDomain.com](mailto:me@thisDomain.com) then Elastic Email are blocking it.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [November 17, 2017, 4:08am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/11 "2017-11-17T04:08:33Z")

</div>

What’s wrong with impersonating the other admin account? Just press impersonate.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [November 17, 2017, 4:13am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/12 "2017-11-17T04:13:06Z")

</div>

Or if you just want to change the email, you can deactivate that account, change the email, and activate it again. Not sure if this still works but you can try…

But if you already have an admin account you can do anything. You don’t really need to use the original account. There isn’t anything you can’t do…

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 17, 2017, 5:33am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/13 "2017-11-17T05:33:32Z")

</div>

Just run discourse-setup again.

You can also create an admin with

```
rake admin:create

```

inside the container

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 6:36am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/14 "2017-11-17T06:36:54Z")

</div>

> [@pfaffman](#):
>
> You can also create an admin with

I have done this to set up admin2 but it’s admin1 that I want to fix.

A question regarding discourse-setup. I have been through the process many times over the last few days and at the moment the details are set to admin2. If I set them to admin1 will it change the allocated email address without the system asking for admin1 to confirm the change from the “blocked” email address? That is what it does in the main Discourse admin panel and it will not fix my problem.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [November 17, 2017, 7:34am UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/15 "2017-11-17T07:34:52Z")

</div>

You can change default admin email address in `app.yml` file as below

> [@techAPJ](#):
>
> After that you will need to enter your discourse folder, type out:
> 
> ```plaintext
> cd /var/discourse
> 
> ```
> 
> then:
> 
> ```plaintext
> nano containers/app.yml
> 
> ```
> 
> That’s it! Just make/edit your changes, then do:
> 
> ```plaintext
> git pull
> ./launcher rebuild app
> 
> ```
> 
> You’re good to go!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [November 17, 2017, 12:04pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/17 "2017-11-17T12:04:21Z")

</div>

Not recommended, if all you need to do is change the email address, follow @pfaffman’s advice and run `discourse-setup` again instead.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 12:11pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/18 "2017-11-17T12:11:29Z")

</div>

Thanks @pfaffman and Jeff I’ll give it a bash.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 17, 2017, 12:57pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/20 "2017-11-17T12:57:37Z")

</div>

take admin:create will let you set a password so you can log in without email working. I think this solves your problem (but your problem is really that email doesn’t work)).

You can put multiple admin addresses in app.yml (with discourse-setup)) by separating them with commas.

---

<div class="post-metadata">

### Author: ![Costas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/costas/32/82263_2.png) [@Costas](https://meta.discourse.org/u/Costas)
#### Post date: [November 17, 2017, 1:21pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/21 "2017-11-17T13:21:52Z")

</div>

> [@pfaffman](#):
>
> You can put multiple admin addresses in app.yml

Via discourse-setup right?

But what is the syntax for entering passwords relating to multiple admin accounts if I tried your suggestion?

I know it’s wrong, but I have one long complex password that I use for 100’s of logins around the world but I would still need to know the correct syntax. Comma separated like the email addresses, just one password for all admins or some other combination in discourse-setup ?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 17, 2017, 1:28pm UTC](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241/22 "2017-11-17T13:28:19Z")

</div>

There are no user passwords in `app.yml`, so `./discourse-setup` does not set admin passwords. `rake admin:create` does; you can run it and add as many users as you want.

> [@Costas](#):
>
> I have one long complex password that I use for 100’s of logins around the world

It’s completely unrelated to the discussion here, but “Wrong” does not begin to describe what that is. You really need a password manager. Let your browser remember them or get a password manager. Here is a good review: [The 2 Best Password Managers of 2026 | Reviews by Wirecutter](https://thewirecutter.com/reviews/best-password-managers/). I like keepassx because only I have access to my password file (well, and Dropbox, but I’m pretty sure they don’t have the password for it).

[Next page](https://meta.discourse.org/t/i-entered-the-wrong-admin-email-address-during-initial-setup/74241.md?page=2)
