Project

General

Profile

Can no longer login to web-ui

Added by John Hanley almost 9 years ago

I have a seen a few threads about this but none seem to apply to my situation.

I had a completely working configuration of tvheadend. It launched during startup from the /etc/init.d/tvheadend script in Ubuntu (14.04).

I decided to swap out my /home hard drive as it was near its end of life. I transferred all the /home files to a new hard drive, changed the owner & group permissions accordingly. So all my tvheadend files are hts:video.

Now I can't login to the web interface (9981). I ran dpkg-reconfigure and I can see that it is properly manipulating my superuser file when I give it a new username/password. But when I try the web-ui, It won't accept my superuser username/password as it did before.

I have even tried apt-get purge and then apt-get install to completely reinstall tvheadend. But no dice.

I don't know if the swapping of hard drives had anything to do with it or was just a coincidence.

Any ideas?

Thanks for the help!


Replies (10)

RE: Can no longer login to web-ui - Added by John Hanley almost 9 years ago

Does no one have any suggestions?

I can't login in over port 9981 or port 9982 (over my client TVHClient Android app).

I know that the /etc/init.d script has run and the system is listening on port 9981 and 9982.

At this point, all I have is the package install so it installs with the only user being the superuser (with the correct user/password in the superuser file at /home/hts/.hts/tvheadend/superuser.

So when I go to 192.168.1.100:9981 and get prompted for my username/password, it should be reading the superuser text file and matching it with the username/password I provide.

Is there any reason why it wouldn't be reading it? Or reading it incorrectly?

Any other suggestions? Could it have anything to do with the new hard drive I installed?

Thanks!

RE: Can no longer login to web-ui - Added by Joe User almost 9 years ago

Have you tried starting tvheadend with the --noacl option? (disables access control) Then you can use the webif to change users/passwords.

[[https://tvheadend.org/boards/5/topics/22023?r=22024#message-22024]]

RE: Can no longer login to web-ui - Added by Mark Clarkstone almost 9 years ago

John Hanley wrote:

Does no one have any suggestions?

I can't login in over port 9981 or port 9982 (over my client TVHClient Android app).

I know that the /etc/init.d script has run and the system is listening on port 9981 and 9982.

At this point, all I have is the package install so it installs with the only user being the superuser (with the correct user/password in the superuser file at /home/hts/.hts/tvheadend/superuser.

So when I go to 192.168.1.100:9981 and get prompted for my username/password, it should be reading the superuser text file and matching it with the username/password I provide.

Is there any reason why it wouldn't be reading it? Or reading it incorrectly?

If you've setup an account within Tvheadend using the same username as the superuser that may explain why you're seeing this problem.

Any other suggestions? Could it have anything to do with the new hard drive I installed?

Thanks!

RE: Can no longer login to web-ui - Added by John Hanley almost 9 years ago

Joe User wrote:

Have you tried starting tvheadend with the --noacl option? (disables access control) Then you can use the webif to change users/passwords.

[[https://tvheadend.org/boards/5/topics/22023?r=22024#message-22024]]

So I added the --noacl option in the /etc/init/tvheadend.conf script. After rebooting I was able to access the web ui in Firefox. I added a user (not the same as my superuser), removed the --noacl option, rebooted, and the web ui asks me for a username and password again, but the username/password doesn't work. Neither does my superuser name/password. So back to where I was.

I also could not see the addition of accesscontrol files in my /home/hts/.hts/tvheadend directory so have no idea where tvheadend is storing the username/password of the user I created above. It seems to have saved the user somewhere as starting the UI before I rebooted showed the user was there.

Any thoughts as to what to try next?

Thanks!

RE: Can no longer login to web-ui - Added by saen acro almost 9 years ago

I have similar problem 3 times incorrect login and on forth it's OK.
Even when password is saved in browser.

RE: Can no longer login to web-ui - Added by John Hanley almost 9 years ago

Mine won't login no matter how many times you try. :-(

RE: Can no longer login to web-ui - Added by Mark Clarkstone almost 9 years ago

John Hanley wrote:

Mine won't login no matter how many times you try. :-(

I recommend you delete the contents of /home/hts/.hts/tvheadend & try again. Edit the init script and change the ARGS param to "-f -C --noacl" and restart. Once you're in disable "HTTP digest authentication" in Config -> General -> Base.

RE: Can no longer login to web-ui - Added by John Hanley almost 9 years ago

I deleted the contents of tvheadend and changed the ARGS parameters as suggested. After rebooting, I went into my webui. However, I could not find any "HTTP digest authentication" in Config->General (there was no Base). Different version perhaps?

I added a new user, closed the webui, opened the webui again, and the user was still there.

I removed the -C --noacl from the init script, rebooted and attempted to login to the webui with as my new user. No luck.

I added the --noacl back in and rebooted. When I got back into my webui I noticed the user was no longer there.

I checked, and there was no "accesscontrol" directory added to /home/hts/.hts/tvheadend.

This makes me wonder if the webui is somehow not able to read or write to /home/hts/.hts/tvheadend.

Could be a permissions thing? I checked and the directory is owned by user hts.

Thoughts?

Thanks!

RE: Can no longer login to web-ui - Added by Mark Clarkstone almost 9 years ago

John Hanley wrote:

I deleted the contents of tvheadend and changed the ARGS parameters as suggested. After rebooting, I went into my webui. However, I could not find any "HTTP digest authentication" in Config->General (there was no Base). Different version perhaps?

I added a new user, closed the webui, opened the webui again, and the user was still there.

I removed the -C --noacl from the init script, rebooted and attempted to login to the webui with as my new user. No luck.

I added the --noacl back in and rebooted. When I got back into my webui I noticed the user was no longer there.

I checked, and there was no "accesscontrol" directory added to /home/hts/.hts/tvheadend.

This makes me wonder if the webui is somehow not able to read or write to /home/hts/.hts/tvheadend.

Could be a permissions thing? I checked and the directory is owned by user hts.

Thoughts?

Thanks!

try to write to the directory as the hts user.

sudo -u hts /bin/bash
touch /home/hts/.hts/tvheadend/test.file
rm /home/hts/.hts/tvheadend/test.file
exit

RE: Can no longer login to web-ui - Added by John Hanley almost 9 years ago

try to write to the directory as the hts user.

[...]

Marvelous! This was the key.

I did NOT have permission to create the file test.file. Upon further investigation, I found that when I swapped out my /home drive, I did not set the ownership & permissions properly on /home. I had set proper ownership of all subdirectories of /home, but /home itself was set to a user and not root, and permissions were only for the user.

I changed my /home ownership to root with a chmod 755 and now I can login just fine! I copied over my backed up tvheadend files and I have my channels back.

I just knew it had something to do with permissions somewhere. It seemed rather odd that things went awry when I put in a new hard drive but copied over all the working files.

I will let you all know if there are any other troubles.

Thanks for the help!

    (1-10/10)