How do you install samba for file sharing?

I guess that sudo apt-get install smb-app-osmc would do the job.

Well as a backup I always suggest to have a VNC on hand it helps if something in Kodi gets stucked.

Thank you. sudo apt-get install smb-app-osmc did the trick for me.

I got the Smb intalled from the app store, but it only share the /home/osmc/…
How can I share my hdd too?
Mounted in /media/hd


edited:
found it!
Just had to edit the /etc/samba/smb.conf

Careful with this as smb.conf may be overwritten causing you to lose your settings, you should really have any customisation in smb-shares.conf instead.

2 Likes

Disks are automounted and shared anyway, so you shouldn’t need to make any changes

1 Like

Don’t edit /etc/samba/smb.conf - your changes will get overwritten in future updates. It very clearly says not to do this in the comments section within smb.conf :wink:

You should not need to do anything for your external drives to appear as shares automatically. Did you reboot after installing Samba ?

1 Like

Hi,

how could I prevet this? I dont want to share all my files.

Thanks.

never touched this before, but here we go…

get all the instruction from the smb.conf file:
cat /etc/samba/smb.conf

make a copy of the conf file:
sudo cp /etc/samba/smb.conf /etc/samba/smb-local.conf
edit the conf file:
sudo nano /etc/samba/smb-local.conf
comment out the bits you don’t want by adding a hash # at the start of the line.

restart the samba service:
sudo service samba restart
Have a read:
https://www.samba.org/samba/docs/using_samba/ch06.html

1 Like

You sir are a legend. I had to sign up to thank you. Since reinstalling my last instance of OSMC I couldn’t figure out how to see my external HDD library from my windows pc. This fixed it. Thanks again.

I have tried to install Samba from the OSMC app store but it fails to install, and running ‘sudo apt-get install smb-app-osmc’ gives me this:

Something is wrong with APT before you installed the package. Check the logs.

Thanks, I have uploaded the log at: https://paste.osmc.tv/erahixuror

It looks like you tried to install Samba before installing the OSMC version. You should purge these packages.

There are a lot of packages on your system (i.e. Mono) which may be causing conflicts.

Sam

I had to install/upgrade mono for it to work with Radarr (from this post: [HOW-TO] Install Radarr - #14 by OlKir)

Any idea on how to purge these packages?

sudo apt-get purge <package.name>

Well…after purging mono and samba, OSMC won’t start anymore, loads of errors :wink:

So I wouldn’t recommend any other people following this advice.

Oh well, starting from scratch will probably fix the problem as well, let’s hope thats the silver lining.

That advice is perfect for someone who has not installed all kinds of random, un-needed and possibly harmful packages. In the future, instead of following the advice of some site that appeared in a google search, try asking here

2 Likes

Can I install samba through the chorus2 web interface?

No. But you can send the following command from SSH.

Point taken, and very true. My apologies.

1 Like