summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixos/services/fileshares.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/services/fileshares.nix b/nixos/services/fileshares.nix
index d90018a..e8981c4 100644
--- a/nixos/services/fileshares.nix
+++ b/nixos/services/fileshares.nix
@@ -83,7 +83,7 @@
mustChangePassword = lib.mkEnableOption "force user to set new password on first logon";
disabled = lib.mkEnableOption "disable user";
script = lib.mkOption {
- type = lib.types.attrsOf lib.types.str;
+ type = lib.types.str;
readOnly = true;
internal = true;
visible = false;
@@ -99,18 +99,18 @@
else ""
;
in ''
- if ! ${pkgs.samba}/bin/pbdedit -L 2>/dev/null | cut -d: -f1 | grep -qx ${name} > /dev/null; then
+ if ! ${pkgs.samba}/bin/pdbedit -L 2>/dev/null | cut -d: -f1 | grep -qx ${name} > /dev/null; then
echo "samba: enrolling ${name}"
pw="${lib.escapeShellArg pw}"
# set password to contents of pw
printf '%s\n%s\n' "$pw" "$pw" | ${pkgs.samba}/bin/smbpasswd -s -a ${name} >/dev/null
# set password hash directly if hashedPasswordFile is used
${lib.optionalString (config.hashedPasswordFile != null) ''
- ${pkgs.samba}/bin/pbdedit -u ${name} --set-nt-hash="$pw" > /dev/null
+ ${pkgs.samba}/bin/pdbedit -u ${name} --set-nt-hash="$pw" > /dev/null
''}
# set must change password
${lib.optionalString config.mustChangePassword ''
- ${pkgs.samba}/bin/pbdedit -u ${name} --pwd-must-change-time=0 > /dev/null
+ ${pkgs.samba}/bin/pdbedit -u ${name} --pwd-must-change-time=0 > /dev/null
''}
fi
# enable / disable user