Jump to content

Emby on FreeNAS/Kodi with CIFS Authentication


bmcclure937
 Share

Recommended Posts

bmcclure937

Hey All,

 

I have run a FreeNAS for my home media server for some time (over 6 years)... but my current box was quite outdated (running FN 0.7.2, SAB, SickBeard, Couchpotato) and was due for an upgrade. Long story short, I upgraded my FreeNAS with a whole new hardware build and am now running the latest 9.3.1 with SAB, SR, CP, and Emby! I am thrilled to start using this setup with my Kodi clients to stream my media library.

 

This will be my first time using Emby to keep my media library updated at a central location and synced down to my Kodi clients! As of last night, Emby Server is up and running on my FreeNAS. Admittedly, I have not had much time to test yet so I tested a couple videos via web browser. I am now focusing on installing Emby plugin on my Kodi clients and have some questions. Once the plugin is installed I can test further to ensure things are working nicely together.

 

  1. Path Substitution. I believe I have configured this on the Emby Server so that the Kodi clients play the media from my CIFS/SMB shares. Any other tips/tricks/words of wisdom? Are any settings changes required on the Kodi Emby addon to ensure the media is playing from the CIFS/SMB share instead of transcoding and playing from Emby?
  2. CIFS Authentication. Do I need to tweak any settings in Emby Server or the Kodi plugin to store user/pass for CIFS authentication?
  3. Media Library
    • I assume that Emby is handling all of the media locations so I do not need to add the remote locations (SMB shares) directly to Kodi. 
    • Also assuming that it would be smart to remove existing media sources and blow away my existing Kodi library... or will Emby handle the library portion automatically? I would hate to end up with a jumbled mess up duplicated items.
    • Once Emby is up and running can I still access my media from 'Movies'/'TV Shows' on the Kodi boxes or do I need to configure custom playlists and shortcuts to Emby?

Hopefully you all can help clear up some of this confusion for me.

 

-bmcclure937

Link to comment
Share on other sites

bmcclure937

I got things configured on one of my Kodi clients tonight and the library syncs. I entered my SMB user/password in the addon configuration.

 

I am not able to play media, although it shows the proper SMB path to the file. It says:

 

 

The file is no longer available

Would you like to remove from library?

YES NO

 

EDIT - disregard. I used the Advanced option to reset the database and started clean. Works like a charm. Not sure why Emby just does not clean things out on a fresh install. Oh well.

Edited by bmcclure937
  • Like 1
Link to comment
Share on other sites

Angelblue05

Maybe we should... Or at least add a reminder during the initial setup.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

bmcclure937

I spoke too soon, unfortunately. I was able to get things working last night but am not having luck today with my 2 Kodi clients (one is Amazon FireTV2 and another is an OpenELEC box).

 

Emby plugin is running fine on both of these Kodi clients and I have added user/pass in the settings. I still get the error message above. Looking at the episode or movie information shows the proper SMB share path to the file.

 

If I click on that path and manually enter the SMB credentials then it will allow me to browse and I can see the files. It then seems I can play media from the SMB share.

 

Why is the user/pass entered into the Kodi addon not working properly and allowing access to the media? I am using path substitution properly on the Emby Server running on my FreeNAS and my CIFS/SMB shares are configured correctly. I can browse to these shares and access media with the same user/pass from a Windows Explorer session.

 

Please help! This is causing Emby to be unusable for me at the moment because it is just unreliable.

Link to comment
Share on other sites

we probably need to see a specific example. what actually happened? did you see an error, and if so, where?

Link to comment
Share on other sites

bmcclure937

Any media file I attempt to open results in the following popup message:

 

 

 

The file is no longer available

Would you like to remove from library?

YES NO

 

I can try to post a log this week. I understand I am not following proper procedures to receive accurate assistance on the forums. I experience the same behavior from both FireTV2 and OpenELEC installs of Kodi.

 

It definitely appears that the SMB user/password are not sticking properly in the password.xml file but I have not manually looked at the file to confirm. As mentioned previously,if I open the context menu on a media item (TV show or movie) and then click "Episode information" or "Movie information" it will list the proper SMB share to the media file.

 

I click the PATH of the file and Kodi prompts for user/pass. I enter my user/pass and can see the SMB folder structure. I am then able to play that media item...

 

 

Thoughts? My path substitution is defined on the Emby Server, image below:

 

Ipj4h2g.png

 

I assume I should try to enable logging at INFO level and try to collect logs from either my FireTV or OpenELEC box.

Edited by bmcclure937
Link to comment
Share on other sites

Yea it looks like something client side and until we really dive in and get a look there's no way to know.

Link to comment
Share on other sites

bmcclure937

Fresh Restart followed by Local DB refresh...

 

Open Emby Configuration -> Advanced -> Reset Local Kodi DB

 

Are you sure? Yes

Reset all Emby Addon settings? No

 

Database reset has completed, Kodi will not restart to apply the changes. OK

 

Upon Boot: Emby for Kodi - Running Sync (.... progress syncing movies and TV shows .....)

 

 

Attempt to Open Media:

 

... now working just fine... 

 

Note: I have done these same steps before. I will post back to this thread if the problem crops back up with opening media and receiving that error message about the files not existing.

 

The file is no longer available

Would you like to remove from library?

YES NO

 

 

Uploaded Log

 

http://xbmclogs.com/pume4jdyb

 

One excerpt of log for successful playback:

00:04:17 T:18446744072302142512  NOTICE: EMBY Player -> Played_information: {'smb://USER:PASSWORD@mynas/media/videos/movies/Bourne Supremacy, The (2004)/The Bourne Supremacy.mkv': {'refresh_id': '5b08362276f924cc3ceee195dbe958d6', 'AudioStreamIndex': 1, 'SubtitleStreamIndex': '', 'currentPosition': 5.449000358581543, 'item_id': '5b08362276f924cc3ceee195dbe958d6', 'currentfile': 'smb://USER:PASSWORD@mynas/media/videos/movies/Bourne Supremacy, The (2004)/The Bourne Supremacy.mkv', 'runtime': 65114990000L, 'Type': 'Movie', 'playmethod': 'DirectPlay'}}

Does the USER and PASSWORD not show up in the log or is Emby actually connecting to the SMB share with those credentials (as a guest account)?

 

Disabled Logging on Emby...

Edited by bmcclure937
Link to comment
Share on other sites

Fresh Restart followed by Local DB refresh...

 

Open Emby Configuration -> Advanced -> Reset Local Kodi DB

 

Are you sure? Yes

Reset all Emby Addon settings? No

 

Database reset has completed, Kodi will not restart to apply the changes. OK

 

Upon Boot: Emby for Kodi - Running Sync (.... progress syncing movies and TV shows .....)

 

 

Attempt to Open Media:

 

... now working just fine... 

 

Note: I have done these same steps before. I will post back to this thread if the problem crops back up with opening media and receiving that error message about the files not existing.

 

 

Uploaded Log

 

http://xbmclogs.com/pume4jdyb

 

One excerpt of log for successful playback:

00:04:17 T:18446744072302142512  NOTICE: EMBY Player -> Played_information: {'smb://USER:PASSWORD@mynas/media/videos/movies/Bourne Supremacy, The (2004)/The Bourne Supremacy.mkv': {'refresh_id': '5b08362276f924cc3ceee195dbe958d6', 'AudioStreamIndex': 1, 'SubtitleStreamIndex': '', 'currentPosition': 5.449000358581543, 'item_id': '5b08362276f924cc3ceee195dbe958d6', 'currentfile': 'smb://USER:PASSWORD@mynas/media/videos/movies/Bourne Supremacy, The (2004)/The Bourne Supremacy.mkv', 'runtime': 65114990000L, 'Type': 'Movie', 'playmethod': 'DirectPlay'}}

Does the USER and PASSWORD not show up in the log or is Emby actually connecting to the SMB share with those credentials (as a guest account)?

 

Disabled Logging on Emby...

Apologies for jumping in but perhaps I could share my set up and how I have Kodi with the Emby plugin on my Pi2.

 

Like you all my moves etc are on a NAS with SMB shares and these are set with guest access, Emby runs on a separate server with the following in the fstab,

 

//ipaddress of nas/movies /mnt/media/movies cifs users,users 0 0 

 

Path substitution is set up the same as yours, the Emby addon for Kodi uses Emby as the username with no password, all this works as the Emby server takes care of the authentication to the smb shares and the path substitution which I assume the Kodi plugin uses tells the clients where the files are.

 

I know the usual for setting up SMB share access is to use a password xml but I could never get this work properly without having to enter a username or password so I dropped it. Whilst my method is not secure based upon user access etc mine is purely for home use.

Link to comment
Share on other sites

bmcclure937

Thanks. @@Angelblue05 what do you think?  If he configures smb credentials in Kodi will they be utilized by the add-on?

 

The very odd thing is that the configuration is now working after following the steps above. Not sure if you saw the line where I said it was working when I followed those steps and blew away the local Kodi database. I kept the Emby settings and upon reset it loaded library and now it seems to work fine. As I mentioned, I am nervous that this could break on any whim because I thought things were working fine a day ago and then I encountered these problems (see OP and my other post where I had these issues then blew away the Kodi DB and it fixed it then).

 

 

Apologies for jumping in but perhaps I could share my set up and how I have Kodi with the Emby plugin on my Pi2.

 

...

 

Thanks for your thoughts. I know my SMB security is all configured properly. I am just not sure why the Kodi clients encountered these odd issues.

Link to comment
Share on other sites

Angelblue05

I'm glad you solved this. Since you are using the stable version of the add-on with playback mode set to direct paths, we include the username and password in the path. A reset of the database would allow for your paths to be set with the new credentials in the add-on settings.

 

In beta we changed this to move the credentials to passwords.xml (this is how kodi actually works), this way we can leave the credentials out of the paths, and you can change them without requiring a database reset.

 

As for your question, Kodi automatically blanks out the username and password in log. We are not using a guest account of sort.

 

Sorry that I wasn't able to reply sooner.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

bmcclure937

No worries. Thanks for the reply. This makes sense now that it has been explained but was not the most user friendly experience since I did not see this behavior documented anywhere.

 

Maybe on the first boot when Emby is starting and asking about some of the other settings it should require the user to enter user/pass if they enable the option for direct paths. This would allow the user/pass to be correct when the first database sync with Emby happens.

 

Hope that things will continue to run smoothly for me. I have heard great things about Emby and am looking forward to having it as part of my home media solution now, especially for managing metadata, artwork, and syncing watched status between all of my Kodi clients.

 

Keep up the great work!

  • Like 1
Link to comment
Share on other sites

Angelblue05

Yes, your suggestion is already implemented in beta, even if it doesn't matter anymore if you enter them before or after.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...