Samba Standalone Server: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
=Install=
+
=Installation=
*apt install -y samba
+
* '''apt install samba smbclient -y'''
 +
 
 
=config=
 
=config=
 
* Sicherheitskopie erstellen
 
* Sicherheitskopie erstellen

Version vom 25. August 2024, 17:20 Uhr

Installation

  • apt install samba smbclient -y

config

  • Sicherheitskopie erstellen
  • cp -v /etc/samba/smb.conf{,.orig}

/etc/samba/smb.conf

testen der config

einfach

  • testparm

Maximale Anzahl gleichzeitig geöffneter Dateien erhöhen

  • ulimit -n 16384
  • echo "* - nofile 16384" > /etc/security/limits.conf

ausführlich

  • testparm -v

starten von samba

  • systemctl start smbd

stoppen von samba

  • systemctl stop smbd

restarten von samba

  • systemctl restart smbd

Welche Ports sind offen

  • netstat -lntup | grep smbd

testen des samba servers

anonmym

  • smbclient -U% -L localhost

user

  • smbclient -U <username%password> -L localhost

Zugriff

ftp ähnlich mit smbclient

  • smbclient -U xinux%suxer //samba-server/share
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3-0.54.2-3282-SUSE-CODE11-x86_64]
 smb: \> ls
  .                                   D        0  Wed Nov  5 14:55:25 2014
  ..                                  D        0  Sun Nov  2 14:25:17 2014
  misc                                D        0  Wed Nov  5 15:07:39 2014
  isos                                D        0  Sun Nov  2 14:38:01 2014

		36537 blocks of size 4194304. 31888 blocks available
 smb: \> 

mounten

  • mount -t cifs -o username=xinux,password=suxer //samba-server/share /mnt/public

Eintrag in der /etc/fstab

//pc100/share  /mnt/share cifs  username=xinux,passwd=suxer 0 0

Links