Samba: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „Kategorie:ServerApplikation = Installation = <source lang=bash> apt install samba cifs-utils samba-client libpam-smbpass </source> == Dienste == * nmbd *…“) |
|||
Zeile 10: | Zeile 10: | ||
* smbd | * smbd | ||
== Samba | == Samba Benutzer anlegen == | ||
<source lang=bash> | <source lang=bash> | ||
sudo usermod -aG sambashare adam | sudo usermod -aG sambashare adam | ||
Zeile 17: | Zeile 17: | ||
pdbedit -w -L | pdbedit -w -L | ||
</source> | </source> | ||
PAM benutzen: | |||
* /etc/samba/smb.conf | |||
<pre>[global] | |||
... | |||
username map = /etc/samba/my_pam_users.txt | |||
</pre> | |||
* /etc/samba/my_pam_users.txt | |||
<pre>linuxuser1 = jonny | |||
linuxuser2 = adam | |||
</pre> | |||
= Konfiguration = | = Konfiguration = | ||
== Mounten == | == Mounten == | ||
<pre> | |||
//sambaserver/freigabe /mnt/mountpunkt cifs user=username,password=passwort,uid=502,gid=500 | |||
</pre> | |||
<source lang=bash> | |||
mount -t cifs //server/freigabe[Verzeichnis] Mountpunkt/ -o { username=Benutzername,password=Paswort | credentials=/Pfad/Zu/Datei } | |||
</source> | |||
== Freigabe erstellen == | == Freigabe erstellen == | ||
Zeile 31: | Zeile 47: | ||
[Filme] | [Filme] | ||
write list = @adm | write list = @adm | ||
valid users = @einkauf, @einkauf-ro | |||
read list = @einkauf-ro | |||
inherit owner = yes | inherit owner = yes | ||
force group = adm | force group = adm | ||
Zeile 44: | Zeile 62: | ||
<source lang=bash> | <source lang=bash> | ||
smbclient //nil/petra | smbclient //nil/petra | ||
testparm | |||
</source> | </source> |
Version vom 15. April 2021, 18:20 Uhr
Installation
apt install samba cifs-utils samba-client libpam-smbpass
Dienste
- nmbd
- smbd
Samba Benutzer anlegen
sudo usermod -aG sambashare adam
smbpasswd -a jonny
# Auflisten der Benutzer:
pdbedit -w -L
PAM benutzen:
- /etc/samba/smb.conf
[global] ... username map = /etc/samba/my_pam_users.txt
- /etc/samba/my_pam_users.txt
linuxuser1 = jonny linuxuser2 = adam
Konfiguration
Mounten
//sambaserver/freigabe /mnt/mountpunkt cifs user=username,password=passwort,uid=502,gid=500
mount -t cifs //server/freigabe[Verzeichnis] Mountpunkt/ -o { username=Benutzername,password=Paswort | credentials=/Pfad/Zu/Datei }
Freigabe erstellen
- /etc/samba/smb.cnf
[Austausch] path = /home/petra public = yes read only = no browseable = yes [Filme] write list = @adm valid users = @einkauf, @einkauf-ro read list = @einkauf-ro inherit owner = yes force group = adm force directory mode = 770 create mask = 664 force create mode = 664 [global] ... workgroup = EXAMPLE
Kommandos
smbclient //nil/petra
testparm