main

mattermost/focalboard

Last updated at: 29/12/2023 09:40

reset-password.sh

TLDR

The reset-password.sh script is used to reset the password for a user in the Demo Projects project. It takes two parameters, the username of the user and the new password, and makes a request to the Focalboard API to update the user's password.

Methods

None

Classes

None

#!/bin/bash

if [[ $# < 2 ]] ; then
    echo 'reset-password.sh <username> <new password>'
    exit 1
fi

curl --unix-socket /var/tmp/focalboard_local.socket http://localhost/api/v2/admin/users/$1/password -X POST -H 'Content-Type: application/json' -d '{ "password": "'$2'" }'