User management module #80
Reference in New Issue
Block a user
Delete Branch "issue77"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm not sure if the sops thing works. Maybe the hash in cleartext is secure enough?
Fixes #77
Yeah, sops doesn't work like this. In my local testing when I just write the hash in cleartext it passes the flake check, but I'm not sure if it is secure enough
@Ahtlon instead of using the
users.users.<name>.hashedPassworduseusers.users.<name>.hashedPasswordFilewhich will work with sops :)Btw reading the description of that option on search.nixos.org i found this:
maybe this is something we want to set - but iam not sure.
Actually there is more to setting a userpw with sops: https://github.com/Mic92/sops-nix?tab=readme-ov-file#setting-a-users-password
Still doesn't work in run-vm. Probably because of the early-loading stuff
maybe i miss something here, but as far as i understand none of the hosts can decrypt the malobeo user secrets.yaml at all right now. In the .sops.yaml. only admin keys are added. Also when we add new sops secret files that do not belong to a single host we need to properly handle the dummy-secrets overwrite for them so than run-vm with the --dummy-secrets flag can take care of that as in
If there are questions on how to do that just let me know :)
Rebased on #84
e379679448to912c8e1195WIP: User management moduleto User management module@@ -38,6 +37,8 @@ inethernetDrivers = ["r8169"];};malobeo.users.malobeo = true;With default enable, this does nothing anymore... Should we disable the admin account on bakunin? The autoupdate script should still run to apply updates but we (and any attackers) could no longer change the system manually
@@ -52,1 +52,4 @@malobeo.users = {malobeo = true;admin = true;Forgot to remove this when I changed the default, but it also doesn't hurt to write it explicitly
@@ -0,0 +23,4 @@description = "malobeo user, password and ssh access, no root";extraGroups = [ "pipewire" "pulse-access" "scanner" "lp" ];openssh.authorizedKeys.keys = sshKeys.admins;hashedPassword = "$y$j9T$39oJwpbFDeETiyi9TjZ/2.$olUdnIIABp5TQSOzoysuEsomn2XPyzwVlM91ZsEkIz1";Should be changed at some point to use sops