try SMB, folder public wird angezeigt, login klappt nicht

This commit is contained in:
Rob committed 2024-01-17 06:14:55 +00:00
1 parent b67d5b20ae
commit 1a8f9595c8
4 files changed
+46 -12

No files matched your search

+1
View File
@@ -10,5 +10,6 @@
ncdu
parted
gpart
tmux
];
}
+30 -12
View File
@@ -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 ];
}
+14
View File
@@ -13,5 +13,19 @@ in
extraGroups = [ "wheel" "users" "dialout" "network" "system-network" "input" "rsync" ];
openssh.authorizedKeys.keys = keys;
};
};
## SMB user ###
users.groups = {
smbuser = {};
};
users.users = {
smbuser = {
isNormalUser = true;
group = "smbuser";
description = "Fuer den Zugriff per SMB";
extraGroups = [ "users" ];
};
};
}
Symlink
+1
View File
@@ -0,0 +1 @@
/nix/store/lc5s2x37mpcgx8b6hg8ikaf8qpf6hvci-nixos-system-bfds-23.11.2217.d02d818f22c7