Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A mutable user described in 'configuration.nix' gets locked out if an older generation is booted once #38132

Open
alexeymuranov opened this issue Mar 30, 2018 · 6 comments

Comments

@alexeymuranov
Copy link
Contributor

alexeymuranov commented Mar 30, 2018

Issue description

I noticed that if i add an existing imperatively created user to users.users, and then boot once into an old generation, the user gets permanently locked out of its account, and i need to log in as a root to set again a password for that user. This is with mutableUsers = true.

Steps to reproduce

  1. Create a user imperatively:
# useradd -m test
# passwd test
  1. Add this user into /etc/nixos/configuration.nix:
{ # ...
  users.mutableUsers = true;
  users.users.test.isNormalUser = true;
}

And rebuild: nixos-rebuild boot.

  1. Reboot and test that the new test user can log in.

  2. Reboot into the previous generation and observe that the user test has disappeared from the login menu (in LightDM, for example).

  3. Reboot back into the last generation and observe that the password for test user is not accepted anymore.

Technical details

§ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.29, NixOS, 18.03pre131587.b6ddb9913f2 (Impala)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0`
 - channels(alexey): `"nixos-17.03-17.03.1949.78e9665b48f, nixos-17.09-17.09.3205.12512f25e9e"`
 - channels(root): `"nixos-18.03pre131587.b6ddb9913f2"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`
@alexeymuranov alexeymuranov changed the title A mutable user described in configuration.nix gets locked out if an older generation is booted once A mutable user described in 'configuration.nix' gets locked out if an older generation is booted once Mar 30, 2018
@alexeymuranov
Copy link
Contributor Author

An additional detail: if, after rebooting into the previous generation, i recreate the user with the same password, then, after rebooting back into the latest generation, the user password is preserved.

@stale
Copy link

stale bot commented Jun 4, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md and removed 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md labels Jun 4, 2020
@stale
Copy link

stale bot commented Dec 2, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 2, 2020
@alexeymuranov
Copy link
Contributor Author

still important to me

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 2, 2020
@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@alexeymuranov
Copy link
Contributor Author

still important to me

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant