[Nix-dev] Declarative user management merged to master

Pascal Wittmann PascalWittmann at gmx.net
Mon Feb 10 09:26:40 CET 2014


On 02/10/2014 09:00 AM, Rickard Nilsson wrote:
> This sounds strange. If you don't have uid=78 in your passwd file, then 
> the new implementation has touched it, but left the older (499) lightdm 
> user intact. Then the lightdm service really shoule be running as 499, 
> and I can't find anything in NixOS that picks the lightdm uid directly 
> and does a chown or something like that.
> 
> But after your chown-command, /var/lib/lightdm is now owned by 499, right?

I guess it happens here:

  test "$(stat -c %u "${h}")" = ${uid} || chown ${uid} "${h}" || true

https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/users-groups.nix#L437

At least I had the same problem with my user. The ids in
configuration.nix and in /etc/passwd differed and my home directory was
owned by "the uid". I solved it by using in configuration.nix the id
from /etc/passwd. But first I changed uid to u.name in the above line,
which also worked.

Regards Pascal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140210/a1120def/attachment.bin 


More information about the nix-dev mailing list