SMB shares komplett eingerichtet. Zugriff für alle unbeschränkt
This commit is contained in:
1 parent
1a8f9595c8
commit
60ae2ba7b3
1 file changed
+59
-20
+59
-20
@@ -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,32 +20,72 @@
|
||||
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
|
||||
|
||||
#dns proxy = no
|
||||
#security = user
|
||||
#use sendfile = yes
|
||||
#max protocol = smb2
|
||||
# dns proxy = no
|
||||
# security = user
|
||||
# use sendfile = yes
|
||||
# max protocol = smb2
|
||||
# note: localhost is the ipv6 localhost ::1
|
||||
#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
|
||||
# hosts allow = 192.168.0. 127.0.0.1 localhost
|
||||
# hosts deny = 0.0.0.0/0
|
||||
# guest account = nobody
|
||||
'';
|
||||
|
||||
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 ];
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user