-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
user not removed + home directory not created + NixOS confused #20406
Comments
Updated above description to include the (apparently) relevant line
in each user configuration. Line where the error occurs (last commit on Aug 30, I assume I have the same version on my system): Uses perl
|
I was investigating why
|
Can you also paste your filesystem partitions? |
Could be a duplicate of #6481 |
Are you using |
@domenkozar I don't think that's the issue here, I'm using a single (plain simple ext4) partition for the whole system.
@kierdavis Yes, or to be precise: I use the default, which is I think the issue here is twofold:
|
(triage) what’s the status? |
I didn't investigate further than what I wrote above. I don't think it's too much of an issue, though this could be turned into a feature request for nixos to save the generated passwd file (and similar files) somewhere in the nix store (read only thus) and compare the actual passwd file to that in order to know which users had previously been defined. Not sure if it's worth the effort, though. |
Then I’ll close, feel free to reopen. |
Issue description
Removing / renaming a user via
/etc/nixos/configuration.nix
does not remove the old user, does not create home directory for the new user (name) and leads to broken/confused NixOS system (no new users can be created).Happened inside a chroot (
nixos-install --chroot
). Sorry for the rather "raw" report, I currently don't have that much spare time but wanted to record/report this. Also this is my (only) production system (being rebuild on new hardware after hard drive failure) thus I'm a bit limited with respect to tools atm.Steps to reproduce (or better: The story how it happened)
Add a user:
Run
nixos-rebuild switch
. Oh, butfoo
is a terrible name (or a typo), so go back and change:Run
nixos-rebuild switch
.ls /home
shows onlyfoo
. Short panic, go back and change:Run
nixos-rebuild switch
. Still no home directory forbar
, looking into/etc/passwd
now shows both a line forfoo
andbar
(with the correct home directory paths set). Notice output from the just finishednixos-rebuild
with a line:Try to start all over:
Run
nixos-rebuild switch
. Same error message as above. No change in/etc/passwd
. Add a completely different user:Run
nixos-rebuild switch
. Same error message as before./etc/passwd
unchanged, no line forfrob
but still for bothfoo
andbar
.ls /home
still has only a directory forfoo
.Technical details
16.09.929.80cbb8a (Flounder)
nix-env (Nix) 1.11.4
"16.09.929.80cbb8a"
The text was updated successfully, but these errors were encountered: