The officially official Devuan Forum!

You are not logged in.

#1 2021-02-26 23:15:14

nauved-rex
Member
From: USA
Registered: 2021-01-07
Posts: 24  

Simple Generic Read-Only File Server Using SAMBA (suitable for Kodi)

1. Create a folder in your home directory. For this tutorial, call it Share.
2. Install samba:

sudo apt-get install samba

3. From the command line, navigate to /etc/samba
4. Move the config file out of the way:

sudo mv smb.conf smb.conf.bkp

5. Create a new, simple smb.conf, as follows:

[global]
workgroup = WORKGROUP
server string = hostname
mangled names = no
path = /home/username/Share

[Share]
guest ok = yes
guest only = yes
writable = no
browsable = yes

Note: replace username with your actual user name.
Note: replace hostname with your actual host name.
Note: [Share] appears in some clients. It is useful to name it the same as the share folder.
Note: The mangled names=no prevents SAMBA from rewriting filenames which contain Windows special characters, such as colons, commas, and ampersands. It is better not to use Windows special characters in filenames.

6. Enter the command

testconf

and read the results. Is everything OK?

7. Start/Restart the SAMBA server with

sudo /etc/init.d/samba-ad-dc restart

Now simply populate the Share folder with your content.

Use case: this is my setup for a Kodi media source, and it works great! Within Source, I have Movies and Albums with filenames and folders  corresponding Kodi protocols.

Last edited by nauved-rex (2021-02-26 23:21:56)

Offline

#2 2021-02-26 23:40:50

Dutch_Master
Member
Registered: 2018-05-31
Posts: 275  

Re: Simple Generic Read-Only File Server Using SAMBA (suitable for Kodi)

Sudo is a typical Ubuntu-base prefix, on Debian and Devuan by default* you don't need sudo, just su and you have root permissions. Achieve the same on Ubuntu with

sudo su

Now skip the sudo prefix from the above commands.

*this depends on whether or not you've set a root password during installation. If you have, sudo is installed, but disabled for your user. (installed because other programs need it anyway). Technically, if you set a root pw, your regular user is not added to the /etc/sudoers file.

Offline

#3 2021-02-27 03:17:49

nauved-rex
Member
From: USA
Registered: 2021-01-07
Posts: 24  

Re: Simple Generic Read-Only File Server Using SAMBA (suitable for Kodi)

Dutch_Master wrote:

Sudo is a typical Ubuntu-base prefix, on Debian and Devuan by default* you don't need sudo, just su and you have root permissions. Achieve the same on Ubuntu with

sudo su

Now skip the sudo prefix from the above commands.

*this depends on whether or not you've set a root password during installation. If you have, sudo is installed, but disabled for your user. (installed because other programs need it anyway). Technically, if you set a root pw, your regular user is not added to the /etc/sudoers file.

I do both. I create a password for root as the first thing I do when booting the system immediately after the install. I realize that sudo is mostly an Ubuntu thing, but I prefer the way I do things, and see no reason to modify my original post. Thanks for the feedback.

Offline

#4 2021-02-27 06:08:11

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 582  

Re: Simple Generic Read-Only File Server Using SAMBA (suitable for Kodi)

To be sure, use

 su - 

for Devuan Beowulf 3.0 and above.


pic from 1993, new guitar day.

Offline

#5 2021-02-27 23:53:00

nauved-rex
Member
From: USA
Registered: 2021-01-07
Posts: 24  

Re: Simple Generic Read-Only File Server Using SAMBA (suitable for Kodi)

GlennW wrote:

To be sure, use

 su - 

for Devuan Beowulf 3.0 and above.

OK, thanks

Offline

Board footer