Skip to end of metadata
Go to start of metadata
Change the password with the API

You'll need to use the CollectionSpace API to change the password of immutable accounts like the default administrator accounts.  Here are instructions for one way to do this.

Base 64 encode your new password

First, you'll need to encode your new password as a base 64 string. You can do this online at websites like this: https://www.base64encode.org

Create a file with the XML update payload

Next, you'll need to create the XML payload for the API and include the new base 64 encoded password. It should look something like this:

Copy this XML to a file named something like: myAccountUpdate.xml

Get the account's CSID

Next, you'll need to get the CSID (CollectionSpace ID) of the account whose password you want to change. You can use a browser and a URL endpoint like this to get the CSID:

Once you have the account's CSID, you can make an HTTP PUT request that looks something like this:

${domain} - something like "core.collectionspace.org"
${csid} - CSID of the account
${user} - CollectionSpace username that has permissions to make changes to Accounts resources
${password} - The password for the ${user} account above.
${file} - The XML payload file containing the new password

For example, here is what an actual request might look like:

The output of a successful API request will look something like this:

Verify the account's new password.

Voila!  The account has a new password.  You can test it by trying to login to the UI.

  • No labels