Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| linux:samba_install [2024/02/27 08:30] – angelegt psycore | linux:samba_install [2024/09/23 10:50] (aktuell) – gelöscht psycore | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | {{page> | ||
| - | ====== Debian Fileserver mit Samba ====== | ||
| - | {{template> | ||
| - | |||
| - | ===== Samba installieren ===== | ||
| - | |||
| - | <code bash> | ||
| - | fserve ~:# apt-get install samba | ||
| - | |||
| - | Reading package lists... Done | ||
| - | Building dependency tree | ||
| - | Reading state information... Done | ||
| - | Suggested packages: | ||
| - | openbsd-inetd inet-superserver smbldap-tools ldb-tools | ||
| - | The following NEW packages will be installed | ||
| - | samba | ||
| - | 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | ||
| - | ... | ||
| - | ... | ||
| - | Importing account for root...ok | ||
| - | ... | ||
| - | Adding group `sambashare' | ||
| - | Done. | ||
| - | Starting Samba daemons: nmbd smbd. | ||
| - | </ | ||
| - | |||
| - | ===== Anlegen der Gruppen ===== | ||
| - | |||
| - | <code bash> | ||
| - | fserve :~# addgroup smball | ||
| - | |||
| - | fserve :~# addgroup smbusers | ||
| - | |||
| - | fserve :~# addgroup smbadmins | ||
| - | </ | ||
| - | |||
| - | ===== Gruppenordner anlegen ===== | ||
| - | |||
| - | <code bash> | ||
| - | fserve :~# mkdir / | ||
| - | |||
| - | fserve :~# mkdir / | ||
| - | |||
| - | fserve :~# mkdir / | ||
| - | |||
| - | fserve :~# chown root:smball / | ||
| - | |||
| - | fserve :~# chown root: | ||
| - | |||
| - | fserve :~# chown root: | ||
| - | |||
| - | fserve :~# chmod 770 / | ||
| - | |||
| - | fserve :~# chmod 770 / | ||
| - | |||
| - | fserve :~# chmod 2770 / | ||
| - | </ | ||
| - | |||
| - | ===== Samba Konfiguration ===== | ||
| - | |||
| - | ==== Konfiguration sichern ==== | ||
| - | |||
| - | <code bash> | ||
| - | |||
| - | smb.conf öffnen und Inhalt löschen. | ||
| - | |||
| - | ==== Konfiguration ==== | ||
| - | |||
| - | <code text> | ||
| - | [global] | ||
| - | # Arbeitsgruppe | ||
| - | workgroup = <NAME DER WORKGROUP> | ||
| - | |||
| - | # Zugriff per " | ||
| - | # security = share | ||
| - | security = user | ||
| - | # nur notig bei security | ||
| - | encrypt passwords = yes | ||
| - | |||
| - | # Network Neighbourhood | ||
| - | netbios name = <NAME DES SERVERS> | ||
| - | |||
| - | #Genutze Adapter; bei einem eigentlich nicht notwendig | ||
| - | ; interfaces = 192.168.1.2/ | ||
| - | ; bind interfaces only = yes | ||
| - | |||
| - | # NT Beschreibung | ||
| - | server string = Server Samba %v | ||
| - | |||
| - | # Speeddoping | ||
| - | socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 | ||
| - | |||
| - | # | ||
| - | ; hosts allow = 127. 192.168.1.1 192.168.1.2 192.168.1.3 | ||
| - | ; hosts deny = 0.0.0.0/0 | ||
| - | ########## Homeverzeichnisse ######### | ||
| - | [homes] | ||
| - | comment = homes | ||
| - | read only = no | ||
| - | create mask = 0700 | ||
| - | browseable = no | ||
| - | |||
| - | ##### | ||
| - | |||
| - | # Namen in eckigen Klammern sind frei waehlbar | ||
| - | [sbmusers] | ||
| - | comment = Freigabe smbusers | ||
| - | path = / | ||
| - | read only = no | ||
| - | |||
| - | # | ||
| - | ; valid users: | ||
| - | ; admin users: chef | ||
| - | |||
| - | [smbadmins] | ||
| - | comment = Freigabe smbadmins | ||
| - | path = / | ||
| - | read only = no | ||
| - | |||
| - | [smball] | ||
| - | comment = smball | ||
| - | path = / | ||
| - | read only = no | ||
| - | create mask = 770 | ||
| - | directory mask = 770 | ||
| - | </ | ||
| - | |||
| - | Datei speichern. | ||
| - | |||
| - | ==== Konfiguration testen ==== | ||
| - | |||
| - | <code bash> | ||
| - | |||
| - | ==== Samba neustarten ==== | ||
| - | |||
| - | <code bash> | ||
| - | fserve ~:# / | ||
| - | |||
| - | Stopping Samba daemons: nmbd smbd. | ||
| - | Starting Samba daemons: nmbd smbd | ||
| - | </ | ||
| - | |||
| - | ===== Benutzer anlegen ===== | ||
| - | |||
| - | ==== normaler Benutzer ==== | ||
| - | |||
| - | <code bash> | ||
| - | fserve :~# useradd -g smbusers -G smball -m test | ||
| - | |||
| - | fserve :~# chmod 700 /home/test | ||
| - | |||
| - | fserve :~# smbpasswd -a test | ||
| - | |||
| - | New SMB password: | ||
| - | Retype new SMB password: | ||
| - | Added user test. | ||
| - | </ | ||
| - | |||
| - | ==== Admin Benutzer anlegen ==== | ||
| - | |||
| - | <code bash> | ||
| - | fserve :~# useradd -g smbadmins -G smball, | ||
| - | |||
| - | fserve :~# chmod 700 /home/test | ||
| - | |||
| - | fserve :~# smbpasswd -a test | ||
| - | |||
| - | New SMB password: | ||
| - | Retype new SMB password: | ||
| - | Added user test. | ||
| - | </ | ||