Samba Standalone Server: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (6 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | = | + | [[Kategorie:Samba]] |
| − | *apt install -y | + | [[Kategorie:SMB]] |
| + | =Installation= | ||
| + | * '''apt install samba smbclient -y''' | ||
| − | = | + | =config= |
| − | + | * Sicherheitskopie erstellen | |
| − | + | * '''cp -v ''/etc/samba/smb.conf''{,.orig}''' | |
| − | * | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==/etc/samba/smb.conf== | ==/etc/samba/smb.conf== | ||
*[[smb.conf.minimal]] | *[[smb.conf.minimal]] | ||
*[[smb.conf.home]] | *[[smb.conf.home]] | ||
| − | |||
==testen der config== | ==testen der config== | ||
| Zeile 33: | Zeile 22: | ||
==starten von samba== | ==starten von samba== | ||
| − | |||
*systemctl start smbd | *systemctl start smbd | ||
==stoppen von samba== | ==stoppen von samba== | ||
| − | |||
*systemctl stop smbd | *systemctl stop smbd | ||
==restarten von samba== | ==restarten von samba== | ||
| − | |||
*systemctl restart smbd | *systemctl restart smbd | ||
==Welche Ports sind offen== | ==Welche Ports sind offen== | ||
| − | *netstat -lntup | grep | + | *netstat -lntup | grep smbd |
=testen des samba servers= | =testen des samba servers= | ||
Aktuelle Version vom 25. August 2024, 17:25 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