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
@@ -10,5 +10,6 @@
|
|||||||
ncdu
|
ncdu
|
||||||
parted
|
parted
|
||||||
gpart
|
gpart
|
||||||
|
tmux
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
+30
-12
@@ -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,4 +14,18 @@ in
|
|||||||
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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user