-
Notifications
You must be signed in to change notification settings - Fork 5
Restore default admin password
Alexander van Delft edited this page Jun 22, 2020
·
2 revisions
When you don't remember the password of the admin
user, there is a way to restore that to the default password pass
.
Execute the following SQL command to the Postgres Database:
UPDATE "SiteDirectory"."Person_Revision" AS tbl
SET "Jsonb" = jsonb_set("Jsonb", array['password'], '"jZkzthUlrHpJcFggoPYmwQshbl7Qx2vK8P5LRYw2zHo="', true)
FROM (SELECT "Iid", MAX("RevisionNumber") AS "RevisionNumber"
FROM "SiteDirectory"."Person_Revision"
WHERE "Jsonb"->>'shortName' = 'admin'
GROUP BY "Iid") AS sel
WHERE tbl."Iid" = sel."Iid" AND tbl."RevisionNumber" = sel."RevisionNumber";
UPDATE "SiteDirectory"."Person_Cache"
SET "Jsonb" = jsonb_set("Jsonb", array['password'], '"jZkzthUlrHpJcFggoPYmwQshbl7Qx2vK8P5LRYw2zHo="', true)
WHERE "Jsonb"->>'shortName' = 'admin';
UPDATE "SiteDirectory"."Person"
SET "ValueTypeDictionary" = "ValueTypeDictionary" || '"Password"=>"jZkzthUlrHpJcFggoPYmwQshbl7Qx2vK8P5LRYw2zHo="' :: hstore
WHERE "ValueTypeDictionary" -> 'ShortName' = 'admin';
UPDATE "SiteDirectory"."Person"
SET "ValueTypeDictionary" = "ValueTypeDictionary" || '"Salt"=>"E4X3OW+bxBVqhnziqA8hpT59nmZ4qh9cQjfRGzcoNQY="' :: hstore
WHERE "ValueTypeDictionary" -> 'ShortName' = 'admin';
copyright @ Starion Group S.A.