try this.
echo '{
"username": "temp_admin",
"password": "password"
}
' > /storage/.kodi/userdata/addon_data/service.multimedia.tvheadend/superuser
The folder [/storage/.kodi/userdata/addon_data/service.multimedia.tvheadend] must exist, if it doesn't find it using
cd /storage/.kodi/userdata/addon_data/
Once you've created the superuser file reboot the machine and try to login using the above info.