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 ncdu
parted parted
gpart gpart
tmux
]; ];
} }
+30 -12
View File
@@ -9,31 +9,49 @@
services.samba = { services.samba = {
enable = true; enable = true;
enableNmbd = true;
securityType = "user"; securityType = "user";
extraConfig = '' extraConfig = ''
workgroup = WORKGROUP workgroup = WORKGROUP
server string = smbnix server string = BFDS
netbios name = smbnix # netbios name = BFDS
security = user server role = standalone server
log file = /var/log/samba/smbd.%m
max log size = 50
#dns proxy = no
#security = user
#use sendfile = yes #use sendfile = yes
#max protocol = smb2 #max protocol = smb2
# note: localhost is the ipv6 localhost ::1 # note: localhost is the ipv6 localhost ::1
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 map to guest = bad user
''; '';
shares = { shares = {
public = { public = {
path = "/bfds-nix/"; ## "/mnt/Shares/Public"; path = "/bfds-nix/"; ## "/mnt/Shares/Public";
browseable = "yes"; browseable = "yes";
"read only" = "no"; "writable" = "yes";
"guest ok" = "yes"; #"guest ok" = "yes";
"create mask" = "0644"; "public" = "yes";
"directory mask" = "0755"; "force user" = "share";
"force user" = "username";
"force group" = "groupname"; #"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" ]; extraGroups = [ "wheel" "users" "dialout" "network" "system-network" "input" "rsync" ];
openssh.authorizedKeys.keys = keys; 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