How can I install samba via SSH access?

I have searched for how to installing samba on OSMC and all I find are references to the GUI on the TV, like “find the shopping cart” etc.
But I don’t have this OSMC connected to any TV just yet, it is sitting on my workbench for a full configuration session and I use SSH for that. Has worked on all other Pi’s I have installed so far (this is the first time with OSMC though).
Do I need to go the apt-get install samba route or is there another way?
It seems like samba is somehow there because the samba.conf file is in place, however nothing shows up on the network. :worried:

On my Pi2B with OSMC I have attached a 1 TB 2.5" hard disk (via USB) and this is the one I want to have shared out so I can easily add new videos via the share from my Win7 PC. The disk works fine and I can view the videos I preloaded with the disk connected directly to my Win7 PC.
But it will be permanently attached to the Pi from now on and I need to access it via samba.
How?
Is there a wiki or other help page describing this?

sudo apt-get update && sudo apt-get install smb-app-osmc will install and configure Samba for you.

Thanks,
I have done so and now I want to be able to see my NTFS formatted USB hard drive via samba.
I created the smb-shares.conf file while running as sudo su.
In it I added this copied from the [automount template] in the main smb.conf file:

[mediadrive]  <= This is changed to the share name I want to give the hard drive
    browseable = yes
    valid = yes
    valid users = osmc
    path = %P  <== What do I put in here?
    hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/

When I had the system connected to the TV I could find the drive using the Yatse remote app when I went the path VIDEO/FILE, but I have no idea what to put into the conf file…
In fact I don’t see where I can find the disk drive in PuTTY while connected by SSH, this is what I see in /:

root@osmc:/etc/samba# ls -l /
total 78
drwxr-xr-x   2 root root  4096 Jan  1  1970 bin
drwxr-xr-x   4 root root  1536 Jan  1  1970 boot
drwxr-xr-x  15 root root  3220 Jun  9 14:23 dev
drwxr-xr-x  69 root root  4096 Jun 10 07:34 etc
drwxr-xr-x   3 root root  4096 Jan  1  1970 home
drwxr-xr-x  16 root root  4096 Jan  1  1970 lib
drwxr-xr-x   2 root root  4096 Feb 28 09:21 lib64
drwx------   2 root root 16384 Jan  1  1970 lost+found
drwxr-xr-x   3 root root  4096 Jun 10 07:33 media
drwxr-xr-x   2 root root  4096 May 19 20:45 mnt
drwxr-xr-x   3 root root  4096 Jan  1  1970 opt
dr-xr-xr-x 108 root root     0 Jan  1  1970 proc
drwx------   2 root root  4096 Jun 10 08:00 root
drwxr-xr-x  19 root root   560 Jun 10 07:34 run
drwxr-xr-x   2 root root  4096 Jun 10 07:33 sbin
drwxr-xr-x   2 root root  4096 Feb 28 09:21 selinux
drwxr-xr-x   2 root root  4096 May 19 20:45 srv
dr-xr-xr-x  12 root root     0 Jun 10 07:57 sys
drwxrwxrwt   7 root root  4096 Jun 10 07:33 tmp
drwxr-xr-x  10 root root  4096 Jan  1  1970 usr
drwxr-xr-x  11 root root  4096 Jan  1  1970 var
-rw-r--r--   1 osmc osmc     0 Jun  9 09:13 walkthrough_completed

Where is the 1 TB disk drive located so I can list its content?
And what do I add into the smb-shares.conf file to be able to view the drive on the network?

First part is easy - use the mount command, and look for mounts under /media.
For the second part, an automatically mounted drive should show up on the smb network as a share.
Derek

You don’t need to do any of this. Simply plug your drive in and a samba share will be automatically created. (Make sure you have run updates recently though as the auto mounting and auto share creation has had some improvements since RC3)

Drives are auto mounted under /media, so you should see your drive in there from ssh.

Thanks,
I did as follows to get things stable after installing samba:

  1. Edited the /etc/samba/smb-shares.conf file to comment out all of the share definitions I had put there.
  2. Edited the /etc/samba/smb-local.conf to set the workgroup to what I have at home
  3. Shut down the Pi fully
  4. Moved the USB drive to my Win7 PC and changed the drive label from MEDIA to MEDIADRIVE
    (I did this because I had seen the existence of a /media dir in the Pi, so I assumed there could be a conflict in the names.)
  5. Moved the drive back and started the Pi

Now I can see the OSMC computer in the Network node in Windows Explorer and when I expand it I see two shares:
mediadrive
osmc

And I can read the mediadrive share and see the files and folders as well as create new files on it. So it seems like I really don’t have to do anything to get to the point I needed to go.

But there is another slight annoyance:
In the Network view OSMC is displayed twice! It is like I had two Pi with the same name on the network!
What could cause this?

PS: I saw your reply above only when I went here in order to add the new info.
But I have not gotten the alert email even now, am I not supposed to get an email when someone replies to my posts?
Very strange and not so good because discussions may go unanswered when I don’t know someone has replied. DS

Haven’t seen this happen before - what version of Windows do you have ?

Do both icon’s work to access OSMC or is one “dead” ?

Have you rebooted Windows ? Sounds like a glitch in Windows to me if it shows the same device twice…

Possibly changing the workgroup has caused it - Windows may consider the same device name as being a different device due to the different workgroup. If so, eventually it will disappear, or possibly after a reboot of windows.

Windows 7 Professional X64 with the latest SP and patches applied.

Both work exactly the same!

No, I never reboot my PC except in case I have done a Windows Update installation which requires it.

Then I will wait for the duplicate to disappear…