Invalid or forgotten login info?
Locateand cd to the tvheadend directory that contains the tvheadend folders as shown below, you may not have all of these files and folders but you should see "config" and most of them.
root@rpi3-1-1g:/home/mark# ls -lah ../hts/.hts/tvheadend/
total 4.9M
drwxr-xr-x 13 hts hts 4.0K Mar 15 15:57 .
drwxr-xr-x 3 hts hts 4.0K Jan 26 08:43 ..
drwx------ 2 hts video 4.0K Jan 26 09:41 accesscontrol
drwx------ 2 hts video 4.0K Mar 15 15:55 backup
drwx------ 2 hts video 24K Apr 13 14:04 bouquet
drwx------ 2 hts video 4.0K Jan 26 08:43 caclient
drwx------ 4 hts video 4.0K Jan 26 23:39 channel
drwx------ 2 hts video 4.0K Mar 15 15:42 codec
-rw------- 1 hts video 1.6K Mar 15 15:55 config
drwx------ 3 hts video 4.0K Jan 26 08:43 dvr
-rw------- 1 hts video 4.8M Mar 15 15:57 epgdb.v3
drwx------ 3 hts video 4.0K Jan 26 08:54 epggrab
drwx------ 4 hts video 4.0K Jan 26 08:50 input
-rw-r--r-- 1 hts video 22 Mar 15 15:57 .lock
drwx------ 2 hts video 4.0K Mar 15 15:42 profile
-rw------- 1 hts hts 47 Mar 15 15:55 superuser
drwx------ 2 hts video 4.0K Jan 26 08:48 timeshift
Notice the "superuser" file? In the above? If it doesn't exist create it, and make sure that it is owned and readable by your tvheadend user...
cd /home/hts/.hts/tvheadend/
# The path above may be different for your system, so modify this carefully
touch superuser
chmod 660 superuser
chown hts:hts superuser
# change hts:hts to match the user/group tvheadend is running as, use "ls -lah" on your tvheadend directory to find those out
cat << EOF > superuser
{
"username": "adminback",
"password": "adminpass"
}
EOF
# This backdoor user & password must not already exist within your tvheadend config to avoid random issues.
cat superuser
# This should print out what we did before
# Now restart tvheadend & it should pickup this superuser file & allow you to bypass the others you set yourself.
systemctl restart tvheadend
# or use whatever init your system uses
Constant 403 on trying to access the webui after failing to login?
Your browser is caching and automatically sending old and/or invalid login info. Remove any saved passwords (in your browser) then close the browser completely. And try again. If that fails, try another browser or an in-private window.