Change password over api?

How to one change password over API? Didnt find any documentation against the same

Also a small feature request: Forgot Password.

Once i got lock out of my own test install. Thanks

I don’t think there is an API for change password but you can write a custom API.

To reset the password of current Admin, you can simply comment off these lines in install/index.php

// check whether cockpit is already installed
    try {
        if ($app->dataStorage->getCollection('system/users')->count()) {
            header('Location: ../'.($APP_SPACE ? ":{$APP_SPACE}" : ""));
    } catch(Throwable $e) {

And then, open /install route again. It should reset the admin password to admin as the first time cockpit installation.

1 Like

okay…will the data remain intact?

Yes, it does nothing to your storage (data). install/index.php only reset the admin password.