NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.41k stars 14.36k forks source link

users-groups.pl: Ignores skelDirectory #76657

Open mkg20001 opened 4 years ago

mkg20001 commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Set security.pam.makeHomeDir.skelDirectory
  2. Add a user
  3. Start the config as VM

Expected behavior It should copy the files from the skelDirectory into the new $HOME if the $HOME didn't already exist

Additional context https://github.com/NixOS/nixpkgs/blob/release-19.09/nixos/modules/config/update-users-groups.pl#L214-L218

It doesn't do that

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
matthewbauer commented 4 years ago

It looks like pam_mkhomedir just runs when the user logs in and no home directory exists. To use this you would need to set users.users.<user>.createHome = false.

https://linux.die.net/man/8/pam_mkhomedir

mkg20001 commented 4 years ago

Did and it did not work

stale[bot] commented 4 years ago

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.