[Nix-dev] Declarative user management merged to master

Domen Kožar domen at dev.si
Tue Feb 11 00:56:52 CET 2014


I agree: we should treat usernames as "unqiue" from NixOS point of view,
although in Linux you can have two same usernames with different uids.


On Mon, Feb 10, 2014 at 11:08 PM, James Cook <james.cook at utoronto.ca> wrote:

> On 10 February 2014 00:26, Pascal Wittmann <PascalWittmann at gmx.net> wrote:
> > 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
>
> I confirm this.  Changing it to use names instead of uids fixes the
> problem for me.  The following commit shows the complete change I
> made, but don't merge it, because that branch is my personal head with
> a bunch of junk on it.  The commit also uses group name instead of
> gid, although this was not an issue for me.
>
>
> https://github.com/falsifian/nixpkgs/commit/0a8089861c270011d1ad2da7d5eedf5470514428
>
> James
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140211/87ee9bf1/attachment.html 


More information about the nix-dev mailing list