Samba

Iš Žinynas.
04:05, 21 liepos 2022 versija, sukurta \dev\null (Aptarimas | indėlis)
(skirt) ← Ankstesnė versija | Dabartinė versija (skirt) | Vėlesnė versija → (skirt)
Jump to navigation Jump to search

Samba yra laisva ir nemokama SMB/CIFS networking protokolo alternatyva, išleista pagal GNU General Public License. Plačiai naudojama UNIX OS tipo operacinėse sistemose kaip Microsoft Windows network file system alternatyva.

Gentoo diegimas[keisti]

emerge -av samba

Konfigūravimas[keisti]

Linux konfigūraciniai samba failai laikomi /etc/samba kataloge, FreeBSD konfigūraciniai samba failai laikomi /usr/local/etc/samba kataloge.

Pavyzdinis konfigūracinis failas pavadintas smb.conf.example kurį galite panaudoti darydami savo konfigą.

Paprastas smb.conf

[global]
   workgroup = WORKSTATION
   netbios name = LINUX_BOX
   server string = Simple server
   security = user
   printcap name = cups
   load printers = yes
   log file = /var/log/samba/samba.%m
   max log size = 50
   log level = 3
   map to guest = bad user
   encrypt passwords = yes
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dos charset = 775
[public]
   comment = Public Stuff
   path = /home/user/public
   only guest = yes
   public = yes
   writable = no

Žemiau esantis pavyzdys nurodo, jog guest gali peržiūrėti turinį, o Petras gali jį keisti:

[Torrents]
  comment = Downloaded Torrents Storage
  path = /mnt/storage/torrents
  browsable = yes
  guest ok = yes
  read only = no
  read list = guest
  write list = Petras
  create mask = 0755


Paleiskite samba rašydami /etc/init.d/samba start arba freebsd /usr/local/etc/rc.d/samba.sh start

UTF8 normalizavimas[keisti]

Jeigu nerodo UTF8 (unicode) šriftų arba matomas tuščias katalogas (ant MacOS) reikia normalizuoti failų/katalogų pavadinimus

apt install convmv
convmv -r -f utf8 -t utf8 --nfc .

Perkrauti samba ir atjungti bei vėl iš naujo prijungti nutolusį smb diską.

Samba spotlight search support MacOS[keisti]

[global]
   spotlight backend = elasticsearch
   elasticsearch:address = 127.0.0.1
   elasticsearch:port = 9200
   min protocol = LANMAN1
   vfs objects = catia fruit streams_xattr
   fruit:aapl = yes
   fruit:metadata = netatalk
   fruit:resource = file
   fruit:model = MacSamba
   fruit:posix_rename = yes
   fruit:veto_appledouble = no
   fruit:wipe_intentionally_left_blank_rfork = yes
   fruit:delete_empty_adfiles = yes
   rpc_server:mdssvc = enabled
   rpc_daemon:spoolssd = enabled
[share]
  path = /mnt/user/share
  spotlight = yes

MacOS Time Machine share[keisti]

[TimeMachineBackup]
comment = Time Machine
path = /mnt/TimeMachine
browseable = yes
writeable = yes
create mask = 0600
directory mask = 0700
spotlight = yes
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:time machine = yes
fruit:time machine max size = 3T
guest ok = no
hide unreadable = yes
write list = user
read list = user