How to reset the console password for a local account in Twistlock

How to reset the console password for a local account in Twistlock

9393
Created On 11/11/19 23:42 PM - Last Modified 03/18/24 21:28 PM


Objective


If you forgot your Twistlock Console password for a local account in Twistlock, you can reset it. Follow this procedure with caution because unintended changes to the database can break Console.

Procedure


Prerequisites

You have root access to the host where Twistlock Console is installed.

Procedure
  1. Create a hash for the desired password that you wish to reset your Twistlock account to.
$ echo -n <DESIRED_PASSWORD> | openssl dgst -binary -sha256 | openssl base64
  1. Exec into Console container
$ docker exec -it twistlock_console /bin/sh
  1. Run mongo.
$ mongosh
  1. Set password for user 'admin' to admin by running the following commands
> use twistlock
> db.users.insert({ username: "<DESIRED_USERNAME>", password: "<HASH_CREATED_IN_STEP_1>", role: "admin", authType:"basic" })
If the command is executed successfully, you will get the following output:
{
  acknowledged: true,
  insertedIds: { '0': ObjectId("<OBJECT_ID>") }
}
  1. Exit out of database and container
> exit
$ exit
  1. Verify the changes by logging into Console with your new password.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000PNRmCAO&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language