try SMB, folder public wird angezeigt, login klappt nicht
This commit is contained in:
1 parent
b67d5b20ae
commit
1a8f9595c8
4 files changed
+46
-12
No files matched your search
+30
-12
@@ -9,31 +9,49 @@
|
||||
|
||||
services.samba = {
|
||||
enable = true;
|
||||
enableNmbd = true;
|
||||
securityType = "user";
|
||||
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = smbnix
|
||||
netbios name = smbnix
|
||||
security = user
|
||||
server string = BFDS
|
||||
# netbios name = BFDS
|
||||
server role = standalone server
|
||||
|
||||
log file = /var/log/samba/smbd.%m
|
||||
max log size = 50
|
||||
|
||||
#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
|
||||
#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";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "yes";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"force user" = "username";
|
||||
"force group" = "groupname";
|
||||
"writable" = "yes";
|
||||
#"guest ok" = "yes";
|
||||
"public" = "yes";
|
||||
"force user" = "share";
|
||||
|
||||
#"create mask" = "0644";
|
||||
#"directory mask" = "0755";
|
||||
#"force user" = "smbuser";
|
||||
#"force group" = "smbuser";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# 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