[Nix-dev] Declarative user management merged to master
Rickard Nilsson
rickard.nilsson at telia.com
Mon Feb 10 09:00:31 CET 2014
Hi James,
On 02/09/2014 11:04 AM, James Cook wrote:
> On 5 February 2014 07:07, Rickard Nilsson <rickard.nilsson at telia.com> wrote:
>> Hi,
>>
>> I have pushed https://github.com/NixOS/nixpkgs/pull/1076 to
>> nixpkgs/master now. If you don't set users.mutableUsers to false,
>> everything _should_ work as before, but watch out just in case.
>>
>> See the PR discussion and
>> https://github.com/rickynils/nixpkgs/commit/e3de5140ef259d718e0ec9e6c6e1418464589e2a
>> for more info.
>
> I just experienced a strange problem which might be related: after a
> nixos-rebuild, lightdm didn't start, even after I rolled back to a
> previous configuration.
>
> The reason was that the owner of /var/lib/lightdm got changed to 78,
> which doesn't correspond to any user in my passwd file*. I haven't
> fiddled with mutableUsers, so I guess it is set to true.
>
> If I run the following two commands after restarting, lightdm starts.
> # chown lightdm /var/lib/lightdm
> # systemctl restart display-manager.service
>
> I'm not sure I understand the whole story here, but maybe there is a
> chown somewhere which shouldn't get executed when users.mutableUsers
> is set to true?
>
> James
>
> * nixos/modules/misc/ids.nix says lightdm's uid should be 78, but my
> passwd file says it is 499.
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?
/ Rickard
More information about the nix-dev
mailing list