duosec: use root uid as sshd uid has been retired (#33597)

* fix: use root uid as sshd uid has been retired

fixes https://github.com/NixOS/nixpkgs/issues/10088
related PR (abandoned) at https://github.com/NixOS/nixpkgs/pull/15391

* must use "sshd" user otherwise duosec does not work in multi user mode

see https://github.com/duosecurity/duo_unix/issues/89#issuecomment-272062632

authored by

Geoffrey Huntley and committed by
Matthew Justin Bauer
a88ec5e8 f60d7e2a

+2 -2
+2 -2
nixos/modules/security/duosec.nix
··· 25 25 loginCfgFile = optional cfg.ssh.enable 26 26 { source = pkgs.writeText "login_duo.conf" configFile; 27 27 mode = "0600"; 28 - uid = config.ids.uids.sshd; 28 + user = "sshd"; 29 29 target = "duo/login_duo.conf"; 30 30 }; 31 31 32 32 pamCfgFile = optional cfg.pam.enable 33 33 { source = pkgs.writeText "pam_duo.conf" configFile; 34 34 mode = "0600"; 35 - uid = config.ids.uids.sshd; 35 + user = "sshd"; 36 36 target = "duo/pam_duo.conf"; 37 37 }; 38 38 in