Reply with steps to recover access after being locked out due to a wrong config change:
1) login with ssh and stop TVH with systemctl stop service.tvheadend42.service
2) starting TVH with a default config in the home directory (/storage) with tvheadend -C
keep this session open.
3) configure an admin account with a passwd in addition to the default account
via the web-interface
4) stop the new tvheadend sesion with ^C.
5) moving old account details with:
cd /storage/.kodi/userdata/addon_data/service.tvheadend42
mv accesscontrol/ accesscontrol_old
mv passwd/ passwd_old
cp -r ~/.hts/tvheadend/accesscontrol .
cp -r ~/.hts/tvheadend/passwd/ .
6) start TVH again with systemctl start service.tvheadend42.service
Hope this helps
Edit (2023-12-12)* :
I ran into a similar issue again, but now on WSL2 Ubuntu.
The above steps didn't help me this time.
I found I had multiple issues.
Steps that helped me to understand the issue better:
sudo systemctl stop tvheadend.service
# in a second window:
sudo journalctl --unit=tvheadend.service -f
# back in the first window:
sudo systemctl start tvheadend.service
In the outupt in the second window look for clues.
On of my issues was
config: Found legacy '.hts/tvheadend', consider moving this to '.config/hts' instead.
.hts should not be present in my case.
Another issue was
::ffff:192.168.1.10 [ Kodi Media Center ]: Unauthorized access
It is using IPv6 (IPv4 mapped IPv6 address).
I added the following two ranges to the allowed networks list (Configuration > Users > Access Entries >).
,::ffff:192.168.1.0/120,::ffff:127.0.0.1/128