SMB shares komplett eingerichtet. Zugriff für alle unbeschränkt
This commit is contained in:
1 parent
1a8f9595c8
commit
60ae2ba7b3
1 file changed
+51
-12
+51
-12
@@ -7,6 +7,11 @@
|
|||||||
openFirewall = true;
|
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 = {
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableNmbd = true;
|
enableNmbd = true;
|
||||||
@@ -15,8 +20,9 @@
|
|||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
server string = BFDS
|
server string = BFDS
|
||||||
# netbios name = BFDS
|
netbios name = BFDS
|
||||||
server role = standalone server
|
server role = standalone server
|
||||||
|
map to guest = bad user
|
||||||
|
|
||||||
log file = /var/log/samba/smbd.%m
|
log file = /var/log/samba/smbd.%m
|
||||||
max log size = 50
|
max log size = 50
|
||||||
@@ -29,18 +35,57 @@
|
|||||||
# hosts allow = 192.168.0. 127.0.0.1 localhost
|
# hosts allow = 192.168.0. 127.0.0.1 localhost
|
||||||
# hosts deny = 0.0.0.0/0
|
# hosts deny = 0.0.0.0/0
|
||||||
# guest account = nobody
|
# guest account = nobody
|
||||||
map to guest = bad user
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shares = {
|
shares = {
|
||||||
public = {
|
Rob = {
|
||||||
path = "/bfds-nix/"; ## "/mnt/Shares/Public";
|
path = "/bfds-nix/rob";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"writable" = "yes";
|
"writable" = "yes";
|
||||||
#"guest ok" = "yes";
|
"guest ok" = "yes";
|
||||||
"public" = "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";
|
#"create mask" = "0644";
|
||||||
#"directory mask" = "0755";
|
#"directory mask" = "0755";
|
||||||
#"force user" = "smbuser";
|
#"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 ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user