Enable Samba via SSH?

  • My LibreElec box is currently not plugged into any monitor. I assumed copying ~/.config/samba.conf.sample to ~/.config/samba.conf would be enough, but when I try to open \\192.168.X.XX from a Windows PC nothing is found.

    I've then tried

    Code
    systemctl start smbd.service, but running systemctl status smbd.service afterwards gives me
    ● smbd.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smbd.service; disabled; vendor preset: disabled) 
     Active: inactive (dead) 
    Condition: start condition failed at XXXXXXXX ago 
     └─ ConditionPathExists=!/storage/.cache/services/samba.disabled was not met 
    
    XXXXXXXXX LibreELEC systemd[1]: Condition check resulted in Samba SMB Daemon being skipped.
  • Code
    rm /storage/.cach/services/samba.disabled
    rm /storage/.config/samba.conf
    systemctl start samba-config.service

    ^ that should get the service running from the CLI. You only need to create /storage/.config/samba.conf if you want to modify how the service runs, it has no effect on whether the service does/doesn't run.

  • Thank you, I'll try this asap.

    I had edited samba.conf because I wanted to change what folders are exposed.

    As for the .cache folder, does that get reset periodically? That is to say, do I need to add line 1 to my autostart.sh?

    ---------------

    EDIT: it works, but all of my folders under /media are also getting mounted automatically. Can I prevent LE from doing so via SSH, or at least set them read-only?