I just ran into this issue myself when installing TVheadend yesterday for the first time on CentOS7. I started Tvheadend using the command 'tvheadend -u tvheadend -C -f' and created a user and password. I killed the process and I would start tvheadend using 'systemctl start tvheadend' and try to login, but was unsuccessful.
After poking around in the logs, I found out that when running the command 'tvheadend -u tvheadend -C -f' I would see this entry in the logs:
START: HTS Tvheadend version 4.2.3-87~g5b7886e.el7.centos started, running as PID:1569 UID:283 GID:39, CWD:/ CNF:/home/tvheadend/.hts/tvheadend
When using 'systemctl start tvheadend' to start Tvheadend I would see the following in the logs:
START: HTS Tvheadend version 4.2.3-87~g5b7886e.el7.centos started, running as PID:1607 UID:283 GID:283, CWD:/ CNF:/home/tvheadend/config
It seems that the two different commands start tvheadend using a config in different locations and thus making the accesscontrol and passwd entries invalid when I used the first command.
For a work around I edited the file /etc/sysconfig/tvheadend and changed where tvheadend would find the config for starting under systemd. My file now looks like:
> #Configuration file for the tvheadend service.
>
> MALLOC_ARENA_MAX=4
> #OPTIONS="-c /home/tvheadend/config -u tvheadend -g tvheadend -6 --http_port 9981 --htsp_port 9982"
> OPTIONS="-c /home/tvheadend/.hts/tvheadend -u tvheadend -g tvheadend -6 --http_port 9981 --htsp_port 9982"
>
It seems this would be the correct location the config file should be in now from looking at other posts on the subject. You can always place the config file where you want it, or you can possibly use the the command 'tvheadend -c /home/tvheadend/config -u tvheadend -C -f' for the initial user and password config, which should work too instead of editing the /etc/sysconfig/tvheadend file
I also agree with saen acro that the user account and password should be in the same location and not separated. This seems like a poor practice.