# Activating admin account from console

**URL:** https://meta.discourse.org/t/activating-admin-account-from-console/79146
**Category:** Self-hosting
**Created:** [January 27, 2018, 9:46am UTC](https://meta.discourse.org/t/activating-admin-account-from-console/79146 "2018-01-27T09:46:20Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![gpritiranjan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gpritiranjan/32/88408_2.png) [@gpritiranjan](https://meta.discourse.org/u/gpritiranjan)
#### Post date: [January 27, 2018, 9:46am UTC](https://meta.discourse.org/t/activating-admin-account-from-console/79146/1 "2018-01-27T09:46:20Z")

</div>

I am trying to setup Discourse with one-click installer using droplet over Digital Ocean. I followed all the instructions and have correctly configured the SMTP details. But when I register for the admin account using the front-end installer, I am not able to receive the email.

I read a tutorial where it is mentioned that if the email doesn’t land in the mailbox, I can still activate the account and set the user as admin using the following commands using the console:

```
cd /var/discourse
sudo ./launcher enter app
rails c
user = User.find_by_email("<admin_email>")
user.admin = true
user.approved = true
user.save
EmailToken.confirm(user.email_tokens.first.token)

```

I am able to run the commands up to the fourth line. After running the fourth command, it finds and displays the user details. But I am not able to enter the next command. There’s this colon “:” and when I reach the end of the displayed details, “(END)” is written. I can’t type and run the further commands to activate the user.

After rails c, there’s this [1] pry (main) \> thing. I am not so much acquainted with the command line. Please help me out.

---

_[View the full topic](https://meta.discourse.org/t/activating-admin-account-from-console/79146)._
