[Solved] Kerberos and Kodi

Ask questions about Arch Linux ARM. Please search before making a new topic.

[Solved] Kerberos and Kodi

Postby Boblepirate » Sat Nov 04, 2023 5:51 pm

Hello,

I installed an nfs4 server with kerberos authentication on an x86 server. I want to access these shared folders using kodi on a raspberrypi 3 (note: kodi works perfectly). For the moment, these folders are mounted in the fstab, but due to Kerberos the folders are only visible for root.
With Kerberos authentication it is necessary to log in as a user to obtain a ticket opening access to the folders.
The kodi-standalone installation on the raspberrypi uses a kodi system user (uid < 1000 and nologin shell). So I can't use kodi's startup authentication principle to get the Kerberos ticket.

Do you have any idea how to go about getting a ticket in this configuration?
Any help would be appreciated.

Best regards.
Last edited by Boblepirate on Sun Nov 05, 2023 1:29 pm, edited 1 time in total.
Boblepirate
 
Posts: 16
Joined: Mon Apr 05, 2021 12:38 pm

Re: Kerberos and Kodi

Postby graysky » Sat Nov 04, 2023 8:26 pm

Never tried with Kerberos. You might want to post on the kodi forum as it's not really distro specific nor really RPi specific:make_clickable_callback(MAGIC_URL_FULL, ' ', 'https://forum.kodi.tv/forumdisplay.php?fid=52', '', ' class="postlink"')
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Kerberos and Kodi

Postby Boblepirate » Sat Nov 04, 2023 9:38 pm

I understand what you mean, but I think the solution will come more from the system than from Kodi. If I could figure out how systemd generates the session for the kodi user, maybe I could figure out how to generate a ticket.
Boblepirate
 
Posts: 16
Joined: Mon Apr 05, 2021 12:38 pm

Re: [Solved] Kerberos and Kodi

Postby Boblepirate » Sun Nov 05, 2023 1:38 pm

The solution was quite simple in the end. All you had to do was create a keytab file to no longer have to ask for the password (the word is encrypted in the file), place it in the /var/lib/kodi folder (chmod 600 and chown kodi:kodi). Then I modified kodi.service to add the following lines:
[code]
[Service]
ExecStartPre=/usr/bin/kinit -V -kt /var/lib/kodi/nfsuser.keytabmake_clickable_callback(MAGIC_URL_EMAIL, ' ', 'nfsuser@EXAMPLE.LOCAL', '', '')
ExecStopPost=/usr/bin/kdestroy -pmake_clickable_callback(MAGIC_URL_EMAIL, ' ', 'nfsuser@EXAMPLE.LOCAL', '', '')
[/code]
Boblepirate
 
Posts: 16
Joined: Mon Apr 05, 2021 12:38 pm

Re: [Solved] Kerberos and Kodi

Postby graysky » Sun Nov 05, 2023 2:57 pm

Please consider modifying the Arch Wiki Kodi page. Again your solution is not specific to Arch ARM and should be generally applicable.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to User Questions

Who is online

Users browsing this forum: No registered users and 7 guests