passbolt/passbolt_docker

Create Administrative User Error

Closed this issue · 3 comments

Hi, I'm using docker to deploy the app, the image is latest-ce, after the container is running I execute docker exec passbolt su -m -c "bin/cake passbolt register_user -u tengdagg@126.com -f t -l da -r admin" - s /bin/sh www-data prompts me to

2023-08-03 09:28:35 error: [PDOException] SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php on line 39

nourcy commented

Hi!

ok I will download and try, in the meantime can you confirm that there is no extra space between the - and the s in the command you shared.
So the expected command is:
docker exec passbolt su -m -c "bin/cake passbolt register_user -u tengdagg@126.com -f t -l da -r admin" -s /bin/sh www-data

I'll let you know, thanks!
Max

nourcy commented

Just downloaded and try
`docker exec lab-passbolt-1 su -m -c "bin/cake passbolt register_user -u tengdagg@126.com -f t -l da -r admin" -s /bin/sh www-data

 ____                  __          ____  
/ __ \____  _____ ____/ /_  ____  / / /_ 

/ // / __ `/ / / __ / __ / / _/
/ / // ( |
) /
/ / /
/ / / /
/
/ _
,
/
//./_//__/

Open source password manager for teams

User saved successfully.
To start registration follow the link provided in your mailbox or here:
https://passbolt.local/setup/install/86cb31e4-fc62-473d-bc4e-dec7d1ed9435/195be786-f3c8-4f57-bc93-cc3091801c9a`

did you make any changes on the database?

Most likely the issue is with the data model cache. Try running this first then the add user command:

docker exec passbolt su -m -c "bin/cake cache clear_all" -s /bin/sh www-data