Disable system-user in a gateway when production

Hi,
As a gateway, it does not need a system user when production. When the gateway was shipped to user, the user only needs to plug the power cable, and the gateway can work.
So is there any way to disable system user?
By the way, if the system user can be disabled, how to enable it?

Thank you.

what is creating the system user in the first place?

https://docs.ubuntu.com/core/en/guides/build-device/image-building

  • console-conf will download the SSH key registered with your Store account and configure it so you can log into the device via ssh <account name>@<device address> without a password.

So I need to disable console-conf, is there any way I can disable console-conf without modify core snap? I want to use official core snap, do not build a custom one.

You can disable console-conf by injecting at image build-time the file /var/lib/console-conf/complete which will prevent console-conf from running.