Mailing List Archive

Creating user "mythtv" before installing mythtv
My previous discussion on this in Debian 12 with mythtv from
deb-multimedia.org is buried in a long thread so I'm creating a new one
with new information.

It was pointed out that deb-multimedia's version of mythtv v34 from
stable-backports has an additional line in the systemd service,
mythtv-backend.service.

Environment=HOME=/var/lib/mythtv

When I created my user 'mythtv' before installing mythtv I used:

sudo addgroup --gid 200 mythtv
sudo adduser --ingroup mythtv --home /home/mythtv --shell /bin/bash --uid
200 mythtv

This was causing the mythtv Web App to use an incorrect mythconverg
password, 'mythv' and it would not connect to the database.

I could get around this by copying the real password from
/etc/mythtv/config.xml to the field in the web app for the mythconverg
password.

I also found out that I could edit the mythtv-backend.service with:

sudo systemctl edit --full mythtv-backend.service

and change the Environment= to:

Environment=HOME=/home/mythtv

That was pointed out to me, but I was too stupid at that time to understand
that. However, with a lot of experimenting thanks to timeshift and btrfs I
could try out multiple installs and test this to prove it out.

Thanks for all the help from those on this list.

Jim A
Re: Creating user "mythtv" before installing mythtv [ In reply to ]
On 3/1/24 07:58, James Abernathy wrote:
> My previous discussion on this in Debian 12 with mythtv from
> deb-multimedia.org <http://deb-multimedia.org> is buried in a long
> thread so I'm creating a new one with new information.
>
> It was pointed out that deb-multimedia's version of mythtv v34 from
> stable-backports has an additional line in the systemd service,
> mythtv-backend.service.
>
> Environment=HOME=/var/lib/mythtv
>
> When I created my user 'mythtv' before installing mythtv I used:
>
> sudo addgroup --gid 200 mythtv
> sudo adduser --ingroup mythtv --home /home/mythtv --shell /bin/bash
> --uid 200 mythtv
>
> This was causing the mythtv Web App to use an incorrect mythconverg
> password, 'mythv' and it would not connect to the database.
Do you mean mythweb? The web app is the new page on port 6544 in V34.
mythweb is deprecated. The web app does not use the database.
>
> I could get around this by copying the real password from
> /etc/mythtv/config.xml to the field in the web app for the mythconverg
> password.
>
> I also found out that I could edit the mythtv-backend.service with:
>
> sudo systemctl edit --full mythtv-backend.service
>
> and change the Environment= to:
>
> Environment=HOME=/home/mythtv
>
> That was pointed out to me, but I was too stupid at that time to
> understand that.  However, with a lot of experimenting thanks to
> timeshift and btrfs I could try out multiple installs and test this to
> prove it out.
>
> Thanks for all the help from those on this list.
>
> Jim A
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums:https://forum.mythtv.org
Re: Creating user "mythtv" before installing mythtv [ In reply to ]
On Fri, Mar 1, 2024 at 10:34?AM Peter Bennett <pb.mythtv@gmail.com> wrote:
>
>
> On 3/1/24 07:58, James Abernathy wrote:
>
> My previous discussion on this in Debian 12 with mythtv from deb-multimedia.org is buried in a long thread so I'm creating a new one with new information.
>
> It was pointed out that deb-multimedia's version of mythtv v34 from stable-backports has an additional line in the systemd service, mythtv-backend.service.
>
> Environment=HOME=/var/lib/mythtv
>
> When I created my user 'mythtv' before installing mythtv I used:
>
> sudo addgroup --gid 200 mythtv
> sudo adduser --ingroup mythtv --home /home/mythtv --shell /bin/bash --uid 200 mythtv
>
> This was causing the mythtv Web App to use an incorrect mythconverg password, 'mythv' and it would not connect to the database.
>
> Do you mean mythweb? The web app is the new page on port 6544 in V34. mythweb is deprecated. The web app does not use the database.

I was talking about the new Web App setup via localhost:6544 in v34

The web app is helpful in creating mythconverg by providing
instructions if it is not set up. For Ubuntu installed by the PPA the
database is already set up before you run the web app to set up the
backend. So no issues. If you set up mythtv using deb-multimedia.org
(DMO) it works the same if you do not create your mythtv user ahead of
time.

The difference seems to be that mythtv on Debian installed by DMO puts
an extra environment statement in the mythtv-backend.service that
always points HOME=/var/lib/mythtv even when you change HOME to
/home/mythtv.

So this is not a Web App issue. Sorry for the noise.

JIm A
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Creating user "mythtv" before installing mythtv [ In reply to ]
On 01/03/2024 15:32, Peter Bennett wrote:
> On 3/1/24 07:58, James Abernathy wrote:
>>
>> It was pointed out that deb-multimedia's version of mythtv v34 from stable-backports has an
>> additional line in the systemd service, mythtv-backend.service.
>>
>> Environment=HOME=/var/lib/mythtv
>>
>> When I created my user 'mythtv' before installing mythtv I used:
>>
>> sudo addgroup --gid 200 mythtv
>> sudo adduser --ingroup mythtv --home /home/mythtv --shell /bin/bash --uid 200 mythtv
>>
>> This was causing the mythtv Web App to use an incorrect mythconverg password, 'mythv' and it would
>> not connect to the database.
> Do you mean mythweb? The web app is the new page on port 6544 in V34. mythweb is deprecated. The web
> app does not use the database.
>>
>
I should point out that if you're going to add a new user the UID and GID should be (a free value)
greater than 1000, since values below 1000 are reserved for processes installed by the system (apt
etc). Mine are set (arbitrarily) at 1006/1006 but that is because I have other things going on.
Similarly, I have a 'NAS' which shares files through NFS using 1010/1010.

Nice catch about the environment variable, though. Does systemd have to interfere with absolutely
everything?

--

Mike Perkins


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Creating user "mythtv" before installing mythtv [ In reply to ]
On Fri, Mar 1, 2024 at 11:07?AM Mike Perkins
<mikep@randomtraveller.org.uk> wrote:
>
> Nice catch about the environment variable, though. Does systemd have to interfere with absolutely
> everything?
>
> --
>
> Mike Perkins
>
If it wasn't for systemd issues, I'd have nothing to drive me to drink. :-)

JIm Abernathy
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Creating user "mythtv" before installing mythtv [ In reply to ]
On Fri, 1 Mar 2024 16:05:02 +0000, you wrote:

>On 01/03/2024 15:32, Peter Bennett wrote:
>> On 3/1/24 07:58, James Abernathy wrote:
>>>
>>> It was pointed out that deb-multimedia's version of mythtv v34 from stable-backports has an
>>> additional line in the systemd service, mythtv-backend.service.
>>>
>>> Environment=HOME=/var/lib/mythtv
>>>
>>> When I created my user 'mythtv' before installing mythtv I used:
>>>
>>> sudo addgroup --gid 200 mythtv
>>> sudo adduser --ingroup mythtv --home /home/mythtv --shell /bin/bash --uid 200 mythtv
>>>
>>> This was causing the mythtv Web App to use an incorrect mythconverg password, 'mythv' and it would
>>> not connect to the database.
>> Do you mean mythweb? The web app is the new page on port 6544 in V34. mythweb is deprecated. The web
>> app does not use the database.
>>>
>>
>I should point out that if you're going to add a new user the UID and GID should be (a free value)
>greater than 1000, since values below 1000 are reserved for processes installed by the system (apt
>etc). Mine are set (arbitrarily) at 1006/1006 but that is because I have other things going on.
>Similarly, I have a 'NAS' which shares files through NFS using 1010/1010.
>
>Nice catch about the environment variable, though. Does systemd have to interfere with absolutely
>everything?

This is not at all an issue of systemd doing something, just the
package maintainers. You will find that the old SysV scripts also
have environment variables doing the same sort of thing, as does any
other way of starting background programs.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org