+2
nixos/tests/all-tests.nix
+2
nixos/tests/all-tests.nix
······
······+systemd-sysusers-password-option-override-ordering = runTest ./systemd-sysusers-password-option-override-ordering.nix;
+171
nixos/tests/password-option-override-ordering.nix
+171
nixos/tests/password-option-override-ordering.nix
···
···+hashed_yeshash = "$y$j9T$d8Z4EAf8P1SvM/aDFbxMS0$VnTXMp/Hnc7QdCBEaLTq5ZFOAFo2/PM0/xEAFuOE88."; # fnord+hashed_sha512crypt = "$6$ymzs8WINZ5wGwQcV$VC2S0cQiX8NVukOLymysTPn4v1zJoJp3NGyhnqyv/dAf4NWZsBWYveQcj6gEJr4ZUjRBRjM0Pj1L8TCQ8hUUp0"; # meow+# The following users are expected to have the same behavior between immutable and mutable systems+# mutable false: initialHashedPassword -> hashedPassword -> initialPassword -> password -> hashedPasswordFile+# mutable true: initialHashedPassword -> initialPassword -> hashedPassword -> password -> hashedPasswordFile+hashedPasswordFile = (pkgs.writeText "hashed_bcrypt" hashed_bcrypt).outPath; # Expect override of everything above+initialHashedPassword = hashed_yeshash; # lib.trace message implies this overrides everything above+assert "${hashed_sha512crypt}" not in machine.succeed("getent shadow alice"), f"{machine}: alice user password is not correct"+assert "${hashed_bcrypt}" in machine.succeed("getent shadow bob"), f"{machine}: bob user password is not correct"+assert "${hashed_bcrypt}" in machine.succeed("getent shadow cat"), f"{machine}: cat user password is not correct"+assert "${hashed_bcrypt}" in machine.succeed("getent shadow dan"), f"{machine}: dan user password is not correct"+assert "${hashed_sha512crypt}" in mutable.succeed("getent shadow greg"), "greg user password is not correct"+assert "${hashed_sha512crypt}" not in immutable.succeed("getent shadow greg"), "greg user password is not correct"+assert username in machine.succeed(f"cat /tmp/{tty_number}"), f"{machine}: {username} password is not correct"
+77
nixos/tests/systemd-sysusers-password-option-override-ordering.nix
+77
nixos/tests/systemd-sysusers-password-option-override-ordering.nix
···
···+hashedPassword = "$y$j9T$wLgKY231.8j.ciV2MfEXe1$P0k5j3bCwHgnwW0Ive3w4knrgpiA4TzhCYLAnHvDZ51"; # test+hashedPassword1 = "$y$j9T$s8TyQJtNImvobhGM5Nlez0$3E8/O8EVGuA4sr1OQmrzi8GrRcy/AEhj454JjAn72A2"; # test+hashed_sha512crypt = "$6$ymzs8WINZ5wGwQcV$VC2S0cQiX8NVukOLymysTPn4v1zJoJp3NGyhnqyv/dAf4NWZsBWYveQcj6gEJr4ZUjRBRjM0Pj1L8TCQ8hUUp0"; # meow+assert "${hashedPassword}" in machine.succeed("getent shadow alice"), "alice user password is not correct"+assert "${hashedPassword1}" in machine.succeed("getent shadow bob"), "bob user password is not correct"