# Possible to lock self out of gateway configuration

**URL:** <https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083>\
**Category:** Ignition Early Access\
**Created:** [March 6, 2019, 1:23am UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083 "2019-03-06T01:23:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [March 6, 2019, 1:23am UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/1 "2019-03-06T01:23:36Z")

</div>

I have the gateway set up so that only a user with an administrator role can access the config page. Then at some point I had the great idea that “Admin” is much shorter to type than “Administrator” when checking roles, so I changed the role name. Of course, this meant that immediately, there were no users with the Administrator role, and thus I was locked out of the gateway configuration.

The only way I managed to recover from this was to create a vision window in the designer session I (fortunately) already had open, add a user management component to it, test the display, and use the component to add a new Administrator role, and assign it to a user.

Again, total user error on my part, but if I hadn’t had a designer session open this could have been a really big problem.

I’m not sure what the solution to this would be, seeing as obviously it would be a huge security hole to just allow you to break into the configuration without the required role - but perhaps there could be some method of ensuring that you can’t remove/modify a user role if it’s in use in such a critical way?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 6, 2019, 2:05am UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/2 "2019-03-06T02:05:20Z")

</div>

It is possible to use a SQLite access tool to manipulate the gateway’s internal DB while the service is stopped to fix such problems. Non-trivial.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 6, 2019, 4:20am UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/3 "2019-03-06T04:20:05Z")

</div>

You can reset this easily with access to the server:

`./gwcmd.sh -p`

It can also be done through the GCU in earlier versions.

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [March 6, 2019, 9:19pm UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/4 "2019-03-06T21:19:36Z")

</div>

> [@Kevin.Herron](#):
>
> It can also be done through the GCU in earlier versions.

I had thought of this, but as your post implied, there's no GCU on v8 (yet, at least. Is it planned?)

Although, as I recall, the GCU just allowed you to reset passwords, correct? Would it have helped in this instance where I knew the password, but there were just no passwords with the correct role required to access the gateway configuration? Or, more precisely, because the role required for gateway configuration access didn't exist?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 6, 2019, 9:27pm UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/5 "2019-03-06T21:27:10Z")

</div>

The GCU as it was in 7.9 won’t come back, the shell and batch scripts have all the same functionality. I think you still needed to do the reset, even though you knew the password.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 6, 2019, 9:49pm UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/6 "2019-03-06T21:49:12Z")

</div>

> [@ASF](#):
>
> Would it have helped in this instance where I knew the password, but there were just no passwords with the correct role required to access the gateway configuration? Or, more precisely, because the role required for gateway configuration access didn’t exist?

Yes - the reset makes the system go through the commissioning process again, which will both create/reset the password of whatever user your specify, _and_ set it as the system user source/gateway config role.

---

<div class="post-metadata">

**Author:** ![AE2S\_Sanden](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@AE2S\_Sanden](https://forum.inductiveautomation.com/u/AE2S_Sanden)\
**Post date:** [March 11, 2020, 9:24pm UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/7 "2020-03-11T21:24:49Z")

</div>

I’m in the same boat. Does the commissioning process wipe out the gateway config and projects or will they remain in tact?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 11, 2020, 9:31pm UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/8 "2020-03-11T21:31:38Z")

</div>

No, using gwcmd to reset the password (and thus re-initiate commissioning) will not wipe out any other configuration.

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [January 20, 2022, 2:32pm UTC](https://forum.inductiveautomation.com/t/possible-to-lock-self-out-of-gateway-configuration/23083/9 "2022-01-20T14:32:41Z")

</div>

how do i remove the new temp users and provider created? It says an internal db requires it now when i try to delete it.
