From 77c0e2bea8848f214918e9c7725cd0fc4ca2b1e4 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 25 Nov 2021 06:37:59 +0100 Subject: [PATCH] Working copy of samba. --- networking/docker-compose.yaml | 57 +++++++--------------------------- networking/smb.conf | 49 ++++++++++++++--------------- 2 files changed, 35 insertions(+), 71 deletions(-) diff --git a/networking/docker-compose.yaml b/networking/docker-compose.yaml index 66e9183..35bb2eb 100644 --- a/networking/docker-compose.yaml +++ b/networking/docker-compose.yaml @@ -83,58 +83,23 @@ services: - "53:53/udp" restart: always + # Must add "ntlm auth = yes" to global section in smb.conf + # adduser and smbpasswd have to be run + # Sample smb.conf is copied to repo. samba: - build: . + image: gists/samba-server container_name: samba + ports: + - "137:137/udp" + - "138:138/udp" + - "139:139/tcp" + - "445:445/tcp" environment: TZ: Europe/Berlin - network_mode: host + PASSWORD: lmaa,dw. restart: unless-stopped - stdin_open: true - tty: true volumes: - samba-config:/etc/samba - - /media/backup:/share + - /media/backup:/mnt -# smokeping: -# image: lscr.io/linuxserver/smokeping -# container_name: smokeping -# environment: -# - PUID=1000 -# - PGID=1000 -# - TZ=Europe/Berlin -# restart: unless-stopped -# networks: -# - proxy -# volumes: -# - smokeping-config:/config -# - smokeping:/data -# labels: -# - "traefik.enable=true" -# - "traefik.http.routers.smokeping.entrypoints=web" -# - "traefik.http.routers.smokeping.rule=Host(`smokeping.lan`)" -# - "traefik.http.services.smokeping.loadbalancer.server.port=80" -# -# netdata: -# image: netdata/netdata -# container_name: netdata -# restart: unless-stopped -# cap_add: -# - SYS_PTRACE -# networks: -# - proxy -# volumes: -# - netdataconfig:/etc/netdata -# - netdatalib:/var/lib/netdata -# - netdatacache:/var/cache/netdata -# - /etc/passwd:/host/etc/passwd:ro -# - /etc/group:/host/etc/group:ro -# - /proc:/host/proc:ro -# - /sys:/host/sys:ro -# - /etc/os-release:/host/etc/os-release:ro -# labels: -# - "traefik.enable=true" -# - "traefik.http.routers.netdata.entrypoints=web" -# - "traefik.http.routers.netdata.rule=Host(`netdata.lan`)" -# - "traefik.http.services.netdata.loadbalancer.server.port=19999" diff --git a/networking/smb.conf b/networking/smb.conf index cd767cf..b6e668c 100644 --- a/networking/smb.conf +++ b/networking/smb.conf @@ -1,31 +1,30 @@ [global] - workgroup = WORKGROUP - server string = Odroid - server role = standalone server - hosts allow = 192.168.178. 127. - security = user - guest account = nobody - passdb backend = tdbsam - dns proxy = no + netbios name = samba + workgroup = WORKGROUP + server string = Samba Server Version %v + security = user + guest account = nobody + map to guest = Bad User + name resolve order = bcast host lmhosts wins - load printers = no - printcap name = /dev/null - disable spoolss = yes + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes - directory mask = 0755 - force create mode = 0644 - force directory mode = 0755 + directory mask = 0755 + force create mode = 0644 + force directory mode = 0755 - server min protocol = SMB2_10 - client max protocol = SMB3 - client min protocol = SMB2_10 - encrypt passwords = true - restrict anonymous = 2 + ntlm auth = yes [data] - comment = Data - path = /share - browsable = yes - writable = yes - printable = no - guest ok = no + comment = Data + path = /mnt + read only = no + write list = chris + guest ok = no + browsable = yes + writeable = yes + veto files = /._*/.DS_Store/ + delete veto files = yes