Skip to content

Commit

Permalink
modules/services/samba: update config
Browse files Browse the repository at this point in the history
homesv: update password for "user"

Samba now only allows authenticated users to view and modify the share.
  • Loading branch information
fufexan committed Nov 30, 2024
1 parent 2f6d430 commit 253b6d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hosts/homesv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
users.users.user = {
isNormalUser = true;
createHome = false;
hashedPassword = "$6$ENNQ3EC40RMVUr71$oIU8lKa072ucswxNID9CAL5r2v2ih3YK7Dfuva.lEgS22aOs/0Omcead2loZKnolMKqxaPushmV1XQhYtDzgV.";
hashedPassword = "$y$j9T$Ne9tVneuIjJslba3ErU0Z.$peEWu/MZQ1sZwkqY2vMK8eGDBCJqJt2T0uvmqLKnDP0";
};
}
14 changes: 11 additions & 3 deletions modules/services/samba.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@
drive = {
path = "/media";
browseable = "yes";
# R/W
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0777";
"directory mask" = "0777";
# For authenticated users only
"guest ok" = "no";
# Only users in the `users` group
# Make sure you add each user to samba's DB using `sudo smbpasswd -a <user>`
# Also enable them using `sudo smbpasswd -e <user>`
"valid users" = "@users";
"force group" = "users";
# Make sure the entire /media is 775, or you'll have problems with the lines below
"create mask" = "0775";
"directory mask" = "0775";
};
};
openFirewall = true;
Expand Down

0 comments on commit 253b6d4

Please sign in to comment.