SMB shares komplett eingerichtet. Zugriff für alle unbeschränkt

This commit is contained in:
Rob committed 2024-01-17 06:40:23 +00:00
1 parent 1a8f9595c8
commit 60ae2ba7b3
1 file changed
+51 -12
+51 -12
View File
@@ -7,6 +7,11 @@
openFirewall = true;
};
# Curiously, `services.samba` does not automatically open
# the needed ports in the firewall.
networking.firewall.allowedTCPPorts = [ 445 139 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
services.samba = {
enable = true;
enableNmbd = true;
@@ -15,8 +20,9 @@
extraConfig = ''
workgroup = WORKGROUP
server string = BFDS
# netbios name = BFDS
netbios name = BFDS
server role = standalone server
map to guest = bad user
log file = /var/log/samba/smbd.%m
max log size = 50
@@ -29,18 +35,57 @@
# hosts allow = 192.168.0. 127.0.0.1 localhost
# hosts deny = 0.0.0.0/0
# guest account = nobody
map to guest = bad user
'';
shares = {
public = {
path = "/bfds-nix/"; ## "/mnt/Shares/Public";
Rob = {
path = "/bfds-nix/rob";
browseable = "yes";
"writable" = "yes";
#"guest ok" = "yes";
"guest ok" = "yes";
"public" = "yes";
"force user" = "share";
};
Peggy = {
path = "/bfds-nix/peggy";
browseable = "yes";
"writable" = "yes";
"guest ok" = "yes";
"public" = "yes";
};
Musik = {
path = "/bfds-nix/music";
browseable = "yes";
"writable" = "yes";
"guest ok" = "yes";
"public" = "yes";
};
Filme = {
path = "/bfds-nix/movies";
browseable = "yes";
"writable" = "yes";
"guest ok" = "yes";
"public" = "yes";
};
"Hörbücher" = {
path = "/bfds-nix/hoerbuecher";
browseable = "yes";
"writable" = "yes";
"guest ok" = "yes";
"public" = "yes";
};
ebooks = {
path = "/bfds-nix/ebooks";
browseable = "yes";
"writable" = "yes";
"guest ok" = "yes";
"public" = "yes";
#"force user" = "smbuser";
#"create mask" = "0644";
#"directory mask" = "0755";
#"force user" = "smbuser";
@@ -48,10 +93,4 @@
};
};
};
# Curiously, `services.samba` does not automatically open
# the needed ports in the firewall.
networking.firewall.allowedTCPPorts = [ 445 139 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
}