Samba Standalone Server: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „==Systemuser anlegen== jeder User muss im System auch angelegt werden useradd -m <username> ==Fügt den Benutzer hinzu== sudo smbpasswd -a <username> ==Entf…“) |
|||
| (28 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | + | [[Kategorie:Samba]] | |
| − | + | [[Kategorie:SMB]] | |
| − | + | =Installation= | |
| − | + | * '''apt install samba smbclient -y''' | |
| − | + | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
=config= | =config= | ||
| + | * Sicherheitskopie erstellen | ||
| + | * '''cp -v ''/etc/samba/smb.conf''{,.orig}''' | ||
| + | |||
==/etc/samba/smb.conf== | ==/etc/samba/smb.conf== | ||
| − | *[[ | + | *[[smb.conf.minimal]] |
| − | *[[ | + | *[[smb.conf.home]] |
==testen der config== | ==testen der config== | ||
===einfach=== | ===einfach=== | ||
| − | + | *testparm | |
| + | Maximale Anzahl gleichzeitig geöffneter Dateien erhöhen | ||
| + | *ulimit -n 16384 | ||
| + | *echo "* - nofile 16384" > /etc/security/limits.conf | ||
===ausführlich=== | ===ausführlich=== | ||
| − | + | *testparm -v | |
==starten von samba== | ==starten von samba== | ||
| − | + | *systemctl start smbd | |
| − | |||
==stoppen von samba== | ==stoppen von samba== | ||
| − | + | *systemctl stop smbd | |
| − | |||
==restarten von samba== | ==restarten von samba== | ||
| − | + | *systemctl restart smbd | |
| − | + | ==Welche Ports sind offen== | |
| + | *netstat -lntup | grep smbd | ||
| + | |||
=testen des samba servers= | =testen des samba servers= | ||
==anonmym== | ==anonmym== | ||
| − | + | *smbclient -U% -L localhost | |
==user== | ==user== | ||
| − | + | *smbclient -U <username%password> -L localhost | |
=Zugriff= | =Zugriff= | ||
==ftp ähnlich mit smbclient== | ==ftp ähnlich mit smbclient== | ||
| − | + | *smbclient -U xinux%suxer //samba-server/share | |
| − | smbclient -U xinux%suxer //samba-server/share | + | <pre> |
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3-0.54.2-3282-SUSE-CODE11-x86_64] | Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3-0.54.2-3282-SUSE-CODE11-x86_64] | ||
smb: \> ls | smb: \> ls | ||
| Zeile 51: | Zeile 51: | ||
==mounten== | ==mounten== | ||
| − | + | *mount -t cifs -o username=xinux,password=suxer //samba-server/share /mnt/public | |
===Eintrag in der /etc/fstab=== | ===Eintrag in der /etc/fstab=== | ||
//pc100/share /mnt/share cifs username=xinux,passwd=suxer 0 0 | //pc100/share /mnt/share cifs username=xinux,passwd=suxer 0 0 | ||
| Zeile 59: | Zeile 59: | ||
*http://wiki.ubuntuusers.de/Samba_Server/smb.conf | *http://wiki.ubuntuusers.de/Samba_Server/smb.conf | ||
*http://wiki.ubuntuusers.de/Samba_Server_PDC | *http://wiki.ubuntuusers.de/Samba_Server_PDC | ||
| + | *https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server | ||
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