Suse Samba

Aus xinux.net
Zur Navigation springen Zur Suche springen

Installation

  • zypper install -y samba

Verzeichnis erstellen

  • mkdir -m 777 /mnt/share

Konfiguration

  • cat /etc/smb.conf
[global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   unix password sync = yes
   pam password change = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *new*password* %n\n *new*password* %n\n *updated*
   passwd chat debug = yes
   map to guest = bad user
   usershare allow guests = yes
   acl allow execute always = yes

[share]
  comment = public anonymous access
  path = /mnt/share
  browsable =yes
  create mask = 0660
  directory mask = 0771
  writable = yes
  guest ok = yes

Dienste Aktivieren

  • systemctl enable smb --now
  • systemctl enable nmb --now

Checken ob die Dienste laufen

  • ss -lnutp | grep mbd
udp   UNCONN 0      0       172.28.6.255:137       0.0.0.0:*    users:(("nmbd",pid=3396,fd=17))  
udp   UNCONN 0      0       172.28.6.100:137       0.0.0.0:*    users:(("nmbd",pid=3396,fd=16))  
udp   UNCONN 0      0            0.0.0.0:137       0.0.0.0:*    users:(("nmbd",pid=3396,fd=14))  
udp   UNCONN 0      0       172.28.6.255:138       0.0.0.0:*    users:(("nmbd",pid=3396,fd=19))  
udp   UNCONN 0      0       172.28.6.100:138       0.0.0.0:*    users:(("nmbd",pid=3396,fd=18))  
udp   UNCONN 0      0            0.0.0.0:138       0.0.0.0:*    users:(("nmbd",pid=3396,fd=15))  
tcp   LISTEN 0      50           0.0.0.0:139       0.0.0.0:*    users:(("smbd",pid=3375,fd=32))  
tcp   LISTEN 0      50           0.0.0.0:445       0.0.0.0:*    users:(("smbd",pid=3375,fd=31))  
tcp   LISTEN 0      50              [::]:139          [::]:*    users:(("smbd",pid=3375,fd=30))  
tcp   LISTEN 0      50              [::]:445          [::]:*    users:(("smbd",pid=3375,fd=29))

Firewall neuladen

  • firewall-cmd --zone=public --add-service=samba --permanent
  • firewall-cmd --reload