wiki:Samba

Version 2 (modified by krit, 2 months ago) (diff)

--

Samba

Ref ref

  1. Choose a folder in your computer where you will work. For example:
    mkdir /easy-samba
    

Now you must create a directory where all your shared folders will be located (this folder will be mounted as /share inside the container). For example:

mkdir /easy-samba/share

Let's create the directory where all your configuration files will be located (this folder must be named config and must be placed inside the directory that will be mounted as /share inside the container, that in our case is /easy-samba/share):

mkdir /easy-samba/share/config

Let's create our configuration file: it must be named config.json and it must be in JSON format. Use your favorite text editor:

nano /easy-samba/share/config/config.json

Put this sample configuration in the file:

{
    "domain": "WORKGROUP",
    "users": [
        { "name": "krit", "password": "123456789" }
    ],
    "shares": [
        { "name": "folder1", "path": "/share/folder1", "access": ["krit"] }
    ]
}

Then, test mount smb with client

apt install cifs-utils
sudo mount -t cifs -o user=krit,password=123456789,uid=$USER,gid=$USER //192.168.19.15/folde
r1 /home/krit/Tmp/