Samba3 Rocky Simple: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „= Samba Standalone Share Server unter Rocky Linux = == Firewall (firewalld) == *firewall-cmd --permanent --add-service=samba *firewall-cmd --reload *firewall-…“) |
|||
| Zeile 1: | Zeile 1: | ||
= Samba Standalone Share Server unter Rocky Linux = | = Samba Standalone Share Server unter Rocky Linux = | ||
| + | ==Installation== | ||
| + | *dnf install -y samba | ||
| + | ==Konfiguration== | ||
| + | *cat /etc/samba/smb.conf | ||
| + | <pre> | ||
| + | [global] | ||
| + | workgroup = SAMBA | ||
| + | security = user | ||
| + | |||
| + | passdb backend = tdbsam | ||
| + | |||
| + | printing = cups | ||
| + | printcap name = cups | ||
| + | load printers = yes | ||
| + | cups options = raw | ||
| + | |||
| + | [homes] | ||
| + | comment = Home Directories | ||
| + | valid users = %S, %D%w%S | ||
| + | browseable = No | ||
| + | read only = No | ||
| + | inherit acls = Yes | ||
| + | |||
| + | [share] | ||
| + | comment = share dir | ||
| + | path = /srv/samba/share | ||
| + | read only = No | ||
| + | store dos attributes = Yes | ||
| + | </pre> | ||
| + | |||
== Firewall (firewalld) == | == Firewall (firewalld) == | ||
Version vom 17. Februar 2026, 06:28 Uhr
Installation
- dnf install -y samba
Konfiguration
- cat /etc/samba/smb.conf
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[share]
comment = share dir
path = /srv/samba/share
read only = No
store dos attributes = Yes
Firewall (firewalld)
- firewall-cmd --permanent --add-service=samba
- firewall-cmd --reload
- firewall-cmd --list-all
- Beispielpfad
- /srv/samba/share
- semanage fcontext -a -t samba_share_t "/srv/samba(/.*)?"
- restorecon -Rv /srv/samba
- ls -ldZ /srv/samba
SELinux Boolean (optional)
- Home-Verzeichnisse freigeben
- setsebool -P samba_enable_home_dirs on
- Unsicher – erlaubt Vollzugriff auf beliebige Pfade
- setsebool -P samba_export_all_rw on
Dienste starten
- systemctl enable --now smb
- systemctl enable --now nmb
- systemctl status smb
Samba User anlegen
- smbpasswd -a username
Typische Fehler
- SELinux blockiert → ausearch -m avc -ts recent
- Falsche Unix-Rechte
- Share nicht in /etc/samba/smb.conf definiert