# Password lost OPEN PDC configurator

**URL:** <http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254>\
**Category:** openPDC\
**Created:** [March 6, 2024, 2:34pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254 "2024-03-06T14:34:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 6, 2024, 2:34pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/1 "2024-03-06T14:34:13Z")

</div>

Hello everyone, I have a pdc installed on a virtual machine and the configurator access password was lost, is there any solution to recover this password?

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [March 6, 2024, 3:46pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/2 "2024-03-06T15:46:04Z")

</div>

Hello Luiz,

What is the configurator? Are you talking about the openPDC Manager?

Thanks,  
Stephen

---

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 6, 2024, 4:46pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/3 "2024-03-06T16:46:59Z")

</div>

Yes, and the password is to log into openPDCManger.

Luiz Barreto

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [March 6, 2024, 5:01pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/4 "2024-03-06T17:01:08Z")

</div>

Run the following script in PowerShell, and it will provide instructions for how to add the user that is currently logged into your system as an administrator in openPDC Manager.

```plaintext
$sid = $(whoami /user | select -last 1).Split(' ')[1]

Write-Host
Write-Host "Run the following queries against your openPDC database"

Write-Host
Write-Host "INSERT INTO UserAccount(Name, DefaultNodeID, UseADAuthentication)"
Write-Host "VALUES('$sid', (SELECT TOP 1 ID FROM Node), 1)"

Write-Host
Write-Host "INSERT INTO ApplicationRoleUserAccount(ApplicationRoleID, UserAccountID)"
Write-Host "VALUES((SELECT ID FROM ApplicationRole WHERE Name = 'Administrator'), (SELECT ID FROM UserAccount WHERE Name = '$sid'))"

```

---

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 6, 2024, 5:18pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/5 "2024-03-06T17:18:43Z")

</div>

HI  
After running the script it will only return the following message.

 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/2/2e20802408217a28ddd65c96adf519786839f78e.png)

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [March 6, 2024, 5:42pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/6 "2024-03-06T17:42:48Z")

</div>

Based on your screenshot, here’s what your output should look like.

```auto
Run the following queries against your openPDC database

INSERT INTO UserAccount(Name, DefaultNodeID, UseADAuthentication)
VALUES('S-1-5-21-13536531-4236762608-2840861628-500', (SELECT TOP 1 ID FROM Node), 1)

INSERT INTO ApplicationRoleUserAccount(ApplicationRoleID, UserAccountID)
VALUES((SELECT ID FROM ApplicationRole WHERE Name = 'Administrator'), (SELECT ID FROM UserAccount WHERE Name = 'S-1-5-21-13536531-4236762608-2840861628-500'))

```

---

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 6, 2024, 7:49pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/7 "2024-03-06T19:49:05Z")

</div>

hey  
Sorry for my low knowledge of PowerShell, when I updated the script with this command I got the following response.

 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/7/7769e46b6c2e26861c0aa769a93120e37dc1bfb7.jpeg)

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [March 6, 2024, 9:41pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/8 "2024-03-06T21:41:41Z")

</div>

I guess it’s because you didn’t run it as a script. But it doesn’t matter. I already posted the output in my previous message. You just need to follow the instructions at this point. Run the two `INSERT` statements against your openPDC database, and it should grant you access via openPDC Manager.

---

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 13, 2024, 8:42pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/9 "2024-03-13T20:42:34Z")

</div>

![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/b/b5fbdb450ccf361c3b6ca4eed4e208efabcf552e.png)

Hello again,

Execute the two INSERT statements in the openPDC database and I was not successful, not even a response.

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [March 13, 2024, 8:50pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/10 "2024-03-13T20:50:45Z")

</div>

Your screenshot indicates that you are connected to a transient in-memory database, and also that you haven’t executed the INSERT statements. If your openPDC is using a SQLite database, you need to find the path to the `.db` file it’s using and run `sqlite3 C:\path\to\openPDC.db` to connect to the openPDC database. Then you can paste the INSERT statements into the console to run them against that database. Make sure you add a semicolon to the end of each INSERT statement.

If you don’t know where your `.db` file is, you need to find your installation of openPDC. By default, it gets installed to `C:\Program Files\openPDC`. In that location, there should be a file called `openPDC.exe.config`. Open this file in your favorite text editor and look for the `ConnectionString` setting. The value of this setting should contain the path to your `.db` file.

---

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 14, 2024, 4:39pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/11 "2024-03-14T16:39:03Z")

</div>

Hi Stephen,

I imagine I made some progress, but the following error is occurring as shown in the print.

Thanks in advance for the quick help.

 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/c/cf656e841803c8a5ad3b5dc2fd5b500338b6bb05.png)

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [March 14, 2024, 4:46pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/12 "2024-03-14T16:46:07Z")

</div>

Oh, sorry about that. I didn’t realize I had used syntax specific to SQL Server. The first query should look like this.

```sql
INSERT INTO UserAccount(Name, DefaultNodeID, UseADAuthentication)
VALUES('S-1-5-21-13536531-4236762608-2840861628-500', (SELECT ID FROM Node LIMIT 1), 1);

```

If that doesn’t work, you can try this.

```sql
INSERT INTO UserAccount(Name, DefaultNodeID, UseADAuthentication)
VALUES('S-1-5-21-13536531-4236762608-2840861628-500', (SELECT ID FROM Node), 1);

```

The second query should succeed if you run it after the first query does.

---

<div class="post-metadata">

**Author:** ![Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/luiz_otavio_pacheco/32/1061_2.png) [@Luiz\_Otavio\_Pacheco](http://discussions.gridprotectionalliance.org/u/Luiz_Otavio_Pacheco)\
**Post date:** [March 14, 2024, 5:07pm UTC](http://discussions.gridprotectionalliance.org/t/password-lost-open-pdc-configurator/1254/13 "2024-03-14T17:07:07Z")

</div>

Ok Stephen you are the best, finally working!!!

When you come to Manaus - Amazonas to visit our plant, you will be very welcome!

 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/7/767244eec780b0055fda6665033242a36cf1af9a.jpeg)  
 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/b/b172ec6b16e741329c15457f68c30c21d3e77332.jpeg)
