Brand new OSMC on RPi3B+ - no samba server

So I have installed OSMC on a new SDcard in a new RPi3B+ box.

Most stuff has been going fine including adding a 500GB USB connected hard drive for media to the system (through /etc/fstab editing).
When I was going share the drive with samba (so I can add new videos via the network) I ran into problems, since apparently there was no samba server installed on OSMC by default.
So I did this:
sudo apt-get install samba samba-common-bin
Then I went to /etc/samba/smb.conf in order to enter the stuff I had already fixed on my old OSMC box after the update to the latest OSMC version (when I lost the samba share).

But this smb.conf looks completely different from the one on my old box!
No mention at all of the smb-local.conf file to use to persist configuration across system updates.
And there is no service smbd running either, should it not start by itself when installing samba?

So did I get the wrong samba?

Or should I get it on by some other means?
In the OSMC app there is only samba for accessing other servers from the OSMC box, could not find any way to manage a samba server in OSMC from there…

Remove/Purge all packages you installed manually. Delete /etc/samba folder and its contents and then install samba server from the App Store.

Or if you prefer the command line the answer to your 2015 question is still valid.


Oh boy! I did not remember that 2015 interaction!
But while waiting I found that there is a samba server available in MyOSMC so I did this:
sudo apt-get remove samba
Then installed samba server from within MyOSMC and after this the smb.conf file looked like on my other box.
So I went here to note that I found the better way…
Only to find that you had already replied! :slight_smile:
But now I realize that I might have screwed up anyway, since my command lacked the removal of samba-common-bin…

Can I proceed anyway? Or will a new remove command screw up the install via MyOSMC?
sudo apt-get remove samba-common-bin

And another issue:
this command does not show a running samba daemon:
ps | grep smbd
So did the newly installed MyOSMC version of samba server not start automatically?

Your best bet is to remove samba from the app store, then follow @fzinken’s instructions.

OK. thanks!
Now done and working!
Two remaining issues are:

  1. I have changed the logon password for user osmc, but the samba share still uses the old (well known) password. How do I change the share password?

  2. My NTFS formatted hard drive has a “$RECYCLE.BIN” directory in the root of the drive.
    It is a bit “untidy” to show this unusable directory in all of the file browsing views, so is there a way to hide it at least while navigating in KODI and UPnP/DLNA on the TV?

To remove a package you use the following command :

sudo apt-get purge -y packagename

where “packagename” is the name of the package shown in the dpkg list generated in the following steps.

In order to list all the currently installed packages you can use :

dpkg --get-selections


Have a look in /etc/samba/smb.conf. There’s a line beginning hide files which you need to attach to that share drive, wherever samba is being told to share it. I think you need to do this:

copy smb.conf to smb-local.conf and edit smb-local.conf:
remove the line that starts config file
change [automount template] to [<the name of your share>]

sudo systemctl restart samba

I’ve no idea what the line -valid = no does. Try deleting that if you have problems.

The problem with $RECYCLE.BIN is not confined just to samba, it is global also in KODI.
It displays annoyingly when using Videos/Files/Drive

Yes, it’s annoying but you’d better complain to Kodi. Settings->Media->General->Show hidden files and directories doesn’t have any effect.

Is it a hidden folder?

It’s hidden in Windoze.

It’s not a “hidden file” in the context of Linux :slight_smile:

Even Kodi for Windows doesn’t hide those $DIRS. Bug report anyone?

What happens if I just delete that directory? Will it be magically recreated?

I suspect it will next time you connect the drive to a windows machine. Maybe even just by accessing by samba from a windows machine…

Hide it in Kodi, could be possible with some witchcraft in advancedsettings.xml

  <excludefromlisting> <!-- Regular expressions that if evaluated to true won't be displayed in Files View -->

(*not tested)

Hide in on your DLNA player? In my experience probably not.

The cleanest way to share your media is to create a folder in the root of the drive and from there on build your own layout of media folders. No $Recycle.Bin, System Volume Information and so to worry about in the cosmetic department and headaches on the security front.

1 Like

I was looking for a way to define a disk folder as a video library in Kodi, but found none. In my earlier setup where I used Amber skin I was able to define a certain folder as the top of a library.

It would be nice to have that ability also now, because then I could do as you suggest and have a top level folder that contains the library, thus starting one level down and the recycle bin won’t be there…

Just navigate to it in Videos->Files and add it as a source. Nothing to do with skins.

I navigate here:
Here I see 3 items:

  • Auto-mounted drives
  • Add videos

If I use “Add videos” I can navigate to certain places like subfolders on drive MEDIA, but it seems like MEDIA itself is always there anyway…
And the system seems to require me to define the content type and then start to scan the files and mess up the display.
Now instead of showing a list of file names (vertically oriented) as it did before I “Add videos” it shows a horizontal line of folder icons without any name. If I select one of these then it shows again a horizontal line of file symbols without any names.
Who invented this unusable interface?
If I do not add videos the same folder display a natural list of file names.
And this was exactly how Amber did it…

This is a feature. Most users like to have cover art for their movies and music.

Hit the left arrow and click on the top menu item until you see ‘List’.

Kodi and Andy Morton.