Project

General

Profile

User + Password (Centos 7)

Added by Anonymous about 7 years ago

I installed tvheadend via the instructions under Centos7 via repo.

Under Port 9981 ist keeps askig me "Username + Password"

There is a user "tvheadend" created (i guess thats normal, even when i dont understand why this is required)
When i start it up the first time (via systemctl) it seems to create under /home/tvheadend/ a folder "config" with even a config file. I cant find any passwords or a field where i would be able to set one in those files.

What am i doing wrong?


Replies (14)

RE: User + Password (Centos 7) - Added by Robert Cameron about 7 years ago

The "tvheadend" user that is created at installation is the "system" user that is running the Tvheadend daemon. This is different from the user that the Tvheadend interface is asking for. By default there should be no user created for logging in to the web interface, but perhaps CentOS has set one for default.

To start Tvheadend without a configuration/user, first stop the tvheadend service, then manually start it without a config: sudo systemctl stop tvheadend && sudo tvheadend -u tvheadend -C. This should stop the Tvheadend service, and start an instance of it without a configuration, allowing you to log in to the web interface without providing a username/password. Then, create a new user and give it a password in the Tvheadend webUI, ensuring that you give it all of the permissions you can. Afterwards, return to the terminal you launched Tvheadend from and kill it (Ctrl+C, or, if you backgrounded it and havent' launched put anything else into the background, kill $! should work, too). Then, start the Tvheadend service normally (sudo systemctl start tvheadend), and log in with your newly created user.

RE: User + Password (Centos 7) - Added by Piotr Czechowski about 7 years ago

Hi,
I have same problem and resolution described above doesn't work.

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

cat /home/hts/.hts/tvheadend/superuser

{
"username": "admin_user",
"password": "admin_pass" 
}

RE: User + Password (Centos 7) - Added by Piotr Czechowski about 7 years ago

I did not have such file.
I've created it.
I've put user name and pass of mine root user also tried coping text from above comment.
Didn't work?

I have 4.2 release, is there possibility that 4.2-stable wont have this problem ?

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

Did you restart TVH service
do you have any users created in

#tree /home/hts/.hts/tvheadend/accesscontrol/
/home/hts/.hts/tvheadend/accesscontrol/
├── 17bcce990e8a1e06ff33dca3e0f4bb9e
├── 239eb19981d59b8a7b86666c0c0def89
├── 5644e714d30be21079ec11a5136e411d
└── b7379a8426ec62507445fa347f227eff

0 directories, 4 files

#tree /home/hts/.hts/tvheadend/passwd/
/home/hts/.hts/tvheadend/passwd/
├── 5cd4d117d7f829a6a844c2448add2885
├── 7b5812157658b1b36fdad1db5ffab9ac
├── 854057af6c775b14d6ac96456e05c6b5
└── c83d88f278bff3d66d91271dd8802cfd


if you have users created "superuser" will not work

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

By the way CentOS (very uncomfortable for TVH OS)
only way to make user is by running TVH by "-C" command

 /opt/tvheadend/build.linux/tvheadend -C

p.s.
Developers of CentOS need to work more for Tuners to work
CI - I do not found way to make it work no dvben50221 official support. :(

Intel Crapware when this "programmers" will make something working

vainfo
error: can't connect to X server!
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: 16.4.3.44985-ubit
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : <unknown entrypoint>
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointEncSlice
      VAProfileH264Baseline           : <unknown entrypoint>
      VAProfileH264Baseline           : <unknown entrypoint>
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : <unknown entrypoint>
      VAProfileH264Main               : <unknown entrypoint>
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : <unknown entrypoint>
      VAProfileH264High               : <unknown entrypoint>
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: <unknown entrypoint>
      VAProfileH264ConstrainedBaseline: <unknown entrypoint>
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : <unknown entrypoint>

VA-API version 0.35 totaly somethings is wrong under debian same hardware use VA-API version 0.39
TVH request >= 0.38

RE: User + Password (Centos 7) - Added by Piotr Czechowski about 7 years ago

I restarted service.
I do not see any users created - I do not have folder /home/hts/.hts/tvheadend/accesscontrol/

But in http UI started as superuser I have 2 users.

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

Its not created there.

location is

~/.hts/tvheadend

home folder of user running binary

I compile it with

./configure --enable-bundle

then run as root

Debian/Ubuntu is better choice

RE: User + Password (Centos 7) - Added by Piotr Czechowski about 7 years ago

I have user in
[root@localhost ~]# cd ~/.hts/tvheadend/

[root@localhost tvheadend]# cat accesscontrol/145a3b06a26880df28a36656a63bb36e {
"index": 1,
"enabled": true,
"username": "*",
"prefix": "0.0.0.0/0,::/0",
"uilevel": -1,
"uilevel_nochange": -1,
"streaming": true,
"adv_streaming": true,
"htsp_streaming": true,
"profile": [
],
"dvr": true,
"htsp_dvr": true,
"all_dvr": true,
"all_rw_dvr": true,
"failed_dvr": true,
"htsp_anonymize": false,
"dvr_config": [
],
"webui": true,
"admin": true,
"conn_limit_type": 0,
"conn_limit": 0,
"channel_min": 0,
"channel_max": 0,
"channel_tag_exclude": false,
"channel_tag": [
],
"comment": "Default access entry",
"wizard": false
}

Its default user.

Please post contents of one of passwd files. For above user I have no file.

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

Piotr Czechowski wrote:

I have user in
[root@localhost ~]# cd ~/.hts/tvheadend/

[root@localhost tvheadend]# cat accesscontrol/145a3b06a26880df28a36656a63bb36e {
"index": 1,
"enabled": true,
"username": "*",
"prefix": "0.0.0.0/0,::/0",
"uilevel": -1,
"uilevel_nochange": -1,
"streaming": true,
"adv_streaming": true,
"htsp_streaming": true,
"profile": [
],
"dvr": true,
"htsp_dvr": true,
"all_dvr": true,
"all_rw_dvr": true,
"failed_dvr": true,
"htsp_anonymize": false,
"dvr_config": [
],
"webui": true,
"admin": true,
"conn_limit_type": 0,
"conn_limit": 0,
"channel_min": 0,
"channel_max": 0,
"channel_tag_exclude": false,
"channel_tag": [
],
"comment": "Default access entry",
"wizard": false
}

Its default user.

Please post contents of one of passwd files. For above user I have no file.

http://tvheadend.org/boards/5/topics/27918?r=28588#message-28588
read this

RE: User + Password (Centos 7) - Added by Piotr Czechowski about 7 years ago

Ive added user in -C mode and he is visible on screenshot.

I do not see this user in config file ~/.hts/tvheadend/accesscontrol/145a3b06a26880df28a36656a63bb36e
There is only default user created during install.

To be able to use user created by me should I remove default one from access control ?

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

You created user without password.

P.S.
Note to developers
it is not OK to separate user from password,
it create such situations

RE: User + Password (Centos 7) - Added by Joe Snuffy about 7 years ago

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.

RE: User + Password (Centos 7) - Added by saen acro about 7 years ago

Configuration is in home folder of user with is used to start binary
There is not universal folder to keep configuration.

    (1-14/14)