From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IIGDCFANe2BF3gAAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 18:31:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GK0PA1ANe2BtUAAAB5/wlQ (envelope-from ) for ; Sat, 17 Apr 2021 16:31:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7724FB485 for ; Sat, 17 Apr 2021 18:31:11 +0200 (CEST) Received: from localhost ([::1]:41748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXnqg-0005ze-5Z for larch@yhetil.org; Sat, 17 Apr 2021 12:31:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXnqY-0005zF-C4 for bug-guix@gnu.org; Sat, 17 Apr 2021 12:31:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60917) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXnqY-00016T-2t for bug-guix@gnu.org; Sat, 17 Apr 2021 12:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXnqY-0004cV-0K for bug-guix@gnu.org; Sat, 17 Apr 2021 12:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#36508: GDM files have incorrect owner after temporarily removing service Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 17 Apr 2021 16:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36508 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 36508-submit@debbugs.gnu.org id=B36508.161867700917691 (code B ref 36508); Sat, 17 Apr 2021 16:31:01 +0000 Received: (at 36508) by debbugs.gnu.org; 17 Apr 2021 16:30:09 +0000 Received: from localhost ([127.0.0.1]:44230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXnpg-0004bH-OT for submit@debbugs.gnu.org; Sat, 17 Apr 2021 12:30:09 -0400 Received: from world.peace.net ([64.112.178.59]:45450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXnpe-0004ZN-OH for 36508@debbugs.gnu.org; Sat, 17 Apr 2021 12:30:07 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXnpX-0004Pf-NV; Sat, 17 Apr 2021 12:29:59 -0400 From: Mark H Weaver In-Reply-To: <38fd9bfdc71c689df1606a0b00d632e423c5defa.camel@telenet.be> References: <20190705083620.lbzu7a33awbymh3d@cf0> <1576552162.14721.1618320275616@office.mailbox.org> <87czuxsya5.fsf@netris.org> <875z0pgnqn.fsf@gnu.org> <87eefbidcs.fsf@netris.org> <38fd9bfdc71c689df1606a0b00d632e423c5defa.camel@telenet.be> Date: Sat, 17 Apr 2021 12:28:10 -0400 Message-ID: <878s5g98p6.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Brendan Tildesley , 36508@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618677071; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=5RDThcpIiNuhbaCyQrWzOukhTH63efxm/6tpyFiwjKs=; b=nq9XELfDHKpg1TzllS2Bgp4ePg1SszsFqaZ5gDr0Jj0t8fA7I6CExcob8rel0rD9ZjDV5Q xIf798oa6WTnLx0Z5Byqioq1H5RvAMZEzg4HiwwAio+VVxCKTfbl4J9HLPke/QRuFHMO2+ qB52AhowYL06zk+7UxOxby8y7bpSJaoOgcYIrK+9MOp1tcauSZR5a8lMvBmYVtmAUZXhe/ Gb231iWHg17LysfXZz7Km0+QufhaR+vOoFCpTPbAYrIPIO7Q0mzEr7nWOEEnE4eJnhyEWM mI++sn7IVG7c5L8Kbr/UE2qim5KtQajDcQVKyOz76DVken6mx0mNek0J6TfzMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618677071; a=rsa-sha256; cv=none; b=hA0hr2+PlXys3RyByQBahDwPr6Jbvz08WWs26/FiFWOh6lsoA9sBbSg0MHImQQeZ2/umF7 4zAX6W+oy2Z2WgT7N/T1DPo6aichscE2pKPimgYcWkEQd9fhFJyaOoD/Fv12UjXNUhFI24 bBhHE1kVqcwTnfAa2miXla6juio2cXQTIYiyM+mWph8E7lpu50k2rePtrO7m5rioUZ69Gy FMIJnOyfyD1ZQ083ZUoZcHn5gdGbyk4QI6AaxQ8VGry5NSsm7chbyuYVwfHQWMVVAnC9CD 2juylgqBvDtRhCGvSTPhCXo6oeyp/L8pXTOGJwp+dafNwL6P+AqnexRIVPwppQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.94 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 7724FB485 X-Spam-Score: -0.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: CD/AqbCwJzqr Hi Maxime, Maxime Devos writes: > On Thu, 2021-04-15 at 14:58 -0400, Mark H Weaver wrote: >> Maintain historical mappings from user/group names to UIDs/GIDs, perhaps >> in some file in /etc, where entries are added but *never* automatically >> removed. When allocating UIDs/GIDs, we would avoid any UIDs/GIDs in the >> range of those mappings. > > This seems rather convoluted to me. Why not reuse /etc/passwd and /etc/groups? > My suggestion: > > 1. *never* automatically delete users/groups from /etc/passwd, /etc/groups > (I thought that was how Guix already worked ...) > 2. as users and groups appearing in /etc/passwd and /etc/groups, but not > in the operating system configuration can be confusing, change the comment > string of these users and groups, to something like > > "account removed" > > Add a group 'user-graveyard' for (3), and move these 'pseudo-removed' users > to the 'user-graveyard' group. > 3. Don't forget to remove graveyard users from all groups (except user-graveyard), > make sure the graveyard users can't log in anymore ... (Perhaps add a rule to > the SSH and PAM configuration that forbids logging in to graveyard accounts, > by checking whether the user is in the 'user-graveyard' group?) I would be okay with this approach as well, although it's not obvious to me that it's any cleaner than having a separate /etc/previous-uids file, given items 2 and 3 above. >> Then, provide a UID/GID garbage collector, to be explicitly run by users >> if desired, which would scan all filesystems to find the set of UID/GIDs >> currently referenced, and remove entries from the historical mappings >> that are no longer needed. > > That seems useful for if /etc/passwd and /etc/group is getting full, or just for > cleaning up. You may want to exclude /gnu/store though, for efficiency (-:. Good point! That's one directory that would clearly be a waste to scan :-) > And just in case check whether any live processes have the UID/GID. Sure, sounds good. Thanks! Mark