From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#37423: Changing the login service from GDM to SLiM and then back to GDM causes a really bad loop Date: Thu, 19 Sep 2019 23:22:57 +0200 Message-ID: <87ftksvv4e.fsf@gnu.org> References: <20190916005154.41b74430@interia.pl> <871rwf5y49.fsf@ngyro.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53386) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iB3uF-0002SD-UG for bug-guix@gnu.org; Thu, 19 Sep 2019 17:24:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iB3uE-0000NM-OY for bug-guix@gnu.org; Thu, 19 Sep 2019 17:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iB3uE-0000NE-Le for bug-guix@gnu.org; Thu, 19 Sep 2019 17:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iB3uE-00013O-Eh for bug-guix@gnu.org; Thu, 19 Sep 2019 17:24:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871rwf5y49.fsf@ngyro.com> (Timothy Sample's message of "Tue, 17 Sep 2019 00:45:58 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Timothy Sample Cc: 37423@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Timothy Sample skribis: > Could this be the same issue as ? In short, > Guix doesn=E2=80=99t guarantee that the =E2=80=9Cgdm=E2=80=9D user will h= ave the same UID if it > gets deleted and recreated (which happens when you remove the GDM > service and add it again). You can fix this by ensuring the owner of > the files under =E2=80=9C/var/lib/gdm=E2=80=9D is the current =E2=80=9Cgd= m=E2=80=9D user. If you just (1) configure with GDM, (2) reconfigure without GDM, and (3) reconfigure with GDM again, I would expect the original UID of =E2=80=98gdm= =E2=80=99 to be reused in step #3, as long as it has not been reallocated in the meantime (for instance because the user created other accounts.) We could address this by fixing the UID and GID of the =E2=80=98gdm=E2=80= =99 user: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 06d72b5f60..e87cb4d845 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -764,9 +764,10 @@ the GNOME desktop environment.") ;;; (define %gdm-accounts - (list (user-group (name "gdm") (system? #t)) + (list (user-group (name "gdm") (system? #t) (id 900)) (user-account (name "gdm") + (uid 900) (group "gdm") (system? #t) (comment "GNOME Display Manager user") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable However, looking at the allocation routines in (gnu build accounts), I think that this would forcefully set =E2=80=98gdm=E2=80=99 to 900/900 on ex= isting installations, even if 900 is already used by another account: --8<---------------cut here---------------start------------->8--- scheme@(gnu build accounts)> (allocate-groups (list (user-group (name "foo"= )(id 10))) vlist-null (list (group-entry (name "foo") (gid 20)))) $2 =3D (#< name: "foo" password: #f gid: 10 members: ()>) --8<---------------cut here---------------end--------------->8--- That=E2=80=99s a valid policy (declaration prevails over state), but it does mean that we can=E2=80=99t really apply the above patch. (Or we could use much lower UID/GID numbers, which are less likely to be taken=E2=80=A6) Thoughts? Ludo=E2=80=99. --=-=-=--