summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorRickard Nilsson <rickynils@gmail.com>2014-02-05 15:07:20 +0100
committerRickard Nilsson <rickynils@gmail.com>2014-02-05 15:56:51 +0100
commit0b92ad02c87b9eff8dbc45cc4221289d737d29a6 (patch)
tree1883bac12f17b7cf84591f79119c82690dab87dc /nixos/modules/virtualisation
parent03ee174032530af70b3deb278cd37c393dcaf096 (diff)
downloadnixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.tar
nixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.tar.gz
nixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.tar.bz2
nixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.tar.lz
nixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.tar.xz
nixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.tar.zst
nixlib-0b92ad02c87b9eff8dbc45cc4221289d737d29a6.zip
Re-introduce security.initialRootPassword, and add a new option users.extraUsers.<user>.hashedPassword
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/amazon-image.nix2
-rw-r--r--nixos/modules/virtualisation/virtualbox-image.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix
index 701e95af7d3f..abd2a1084bd9 100644
--- a/nixos/modules/virtualisation/amazon-image.nix
+++ b/nixos/modules/virtualisation/amazon-image.nix
@@ -164,5 +164,5 @@ with pkgs.lib;
   # Prevent logging in as root without a password.  This doesn't really matter,
   # since the only PAM services that allow logging in with a null
   # password are local ones that are inaccessible on EC2 machines.
-  users.extraUsers.root.password = null;
+  security.initialRootPassword = "!";
 }
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
index a89c8264a33f..71bdf31a98d2 100644
--- a/nixos/modules/virtualisation/virtualbox-image.nix
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -111,5 +111,5 @@ with pkgs.lib;
   # Prevent logging in as root without a password.  For NixOps, we
   # don't need this because the user can login via SSH, and for the
   # demo images, there is a demo user account that can sudo to root.
-  users.extraUsers.root.password = null;
+  security.initialRootPassword = "!";
 }