Cockpit login not working "Invalid address: (From): root@localhost"


I got locked out from my Cockpit and the login isn’t working.
Reseting through Username or Email doesn’t work either.
This is the error I’m receiving:
Invalid address: (From): root@localhost

I have access to the server. How to reset or recover the login data?

This means, that your mailer settings aren’t set. You have to add your SMTP credentials in your config.php or config.yaml first. Than you are able to send recovery emails.

Example for mailer config:

If you use SQLite, the credentials are stored in storage/data/cockpit.sqlite in the accounts table - but they are hashed.

If you have shell access to your server, you can create a new admin user via cli, login and change your password via ui.

cd /path/to/cockpit

# generate hash of SuperSecretPassword
php ./cp account/generate-password --passwd SuperSecretPassword

# create new user
php ./cp account/create --user tmpadmin --email --passwd xxHashOfPasswordxx

Cli commands:

1 Like