Ubuntu CORE custom image password issue

yes, you do, either via the interactive console-conf tool (the thing that starts on screen at first boot), with a system-user assertion imported from USB key), with a config snap or with a cloud-init configuration file in the image …

https://ubuntu.com/core/docs/reference/assertions/system-user