diff --git a/nixos/modules/services/security/kanidm.nix b/nixos/modules/services/security/kanidm.nix index d21352e22d9e..2905f5ef0d70 100644 --- a/nixos/modules/services/security/kanidm.nix +++ b/nixos/modules/services/security/kanidm.nix @@ -989,7 +989,6 @@ in "AF_INET6" "AF_UNIX" ]; - TemporaryFileSystem = "/:ro"; } ]; }; @@ -1031,7 +1030,6 @@ in "AF_INET6" "AF_UNIX" ]; - TemporaryFileSystem = "/:ro"; } ]; environment.RUST_LOG = "info"; @@ -1083,7 +1081,6 @@ in # Need access to home directories ProtectHome = false; RestrictAddressFamilies = [ "AF_UNIX" ]; - TemporaryFileSystem = "/:ro"; Restart = "on-failure"; }; environment.RUST_LOG = "info"; diff --git a/nixos/tests/kanidm.nix b/nixos/tests/kanidm.nix index 3594a25c8407..3edc4a8b239f 100644 --- a/nixos/tests/kanidm.nix +++ b/nixos/tests/kanidm.nix @@ -77,6 +77,8 @@ in networking.hosts."${nodes.server.networking.primaryIPAddress}" = [ serverDomain ]; + programs.fish.enable = true; + security.pki.certificateFiles = [ certs.ca.cert ]; }; @@ -126,7 +128,7 @@ in client.wait_for_unit("getty@tty1.service") client.wait_until_succeeds("pgrep -f 'agetty.*tty1'") client.succeed("kanidm person create testuser TestUser") - client.succeed("kanidm person posix set --shell \"$SHELL\" testuser") + client.succeed("kanidm person posix set --shell \"/run/current-system/sw/bin/fish\" testuser") client.send_chars("kanidm person posix set-password testuser\n") client.wait_until_tty_matches("1", "Enter new") client.send_chars("${testCredentials.password}\n") @@ -150,8 +152,10 @@ in client.wait_until_tty_matches("2", "Password: ") client.send_chars("${testCredentials.password}\n") client.wait_until_succeeds("systemctl is-active user@$(id -u testuser).service") - client.send_chars("touch done\n") - client.wait_for_file("/home/testuser@${serverDomain}/done") + client.send_chars("echo -n $SHELL > shell\n") + client.wait_for_file("/home/testuser@${serverDomain}/shell") + user_shell = client.succeed("cat /home/testuser@${serverDomain}/shell").strip() + assert user_shell == "/run/current-system/sw/bin/fish", f"Invalid user shell, expected /run/current-system/sw/bin/fish, got {user_shell}" server.shutdown() client.shutdown()