Is it possible to set a default password in a custum or imagebuilder firmware?
I always adding some packages and a minimum of config files to a imagebuild. With the intension that if someone hit's the resetbutton it's going back to my own factory settings. But now it's without password.
it is better if you add your ssh public key to the image, and also have a 2nd way to access it,
you can have two different dropbear configuration (one default that only allows you to enter with your ssh key and another in another port for emergency if you lost you ssh key)
if someone reset it again you can enter using your ssh key and remove the emergency dropbear entry, or set another random password, or if you cannot access you can instruct someone to reset and you can enter from LAN with default password. You may want to allow 2222 from wan on firewall to access remotely but it is better to have a vpn or remote access to lan, but overall 22 will only be secure to bruteforce password attacks but not so much for new 0-day exploits on dropbear.
cat<<'EOF' > /etc/config/dropbear
# public-key only (no password allowed) access
config dropbear
option PasswordAuth 'off'
option RootPasswordAuth 'off'
option Port '22'
# Normal dropbear/ssh access (for local LAN)
config dropbear
option PasswordAuth 'on'
option RootPasswordAuth 'on'
option Port '2222'
EOF