From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2GGLNWFC4GH6OwAAgWs5BA (envelope-from ) for ; Thu, 13 Jan 2022 16:16:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0FZBLmFC4GEIDgEAG6o9tA (envelope-from ) for ; Thu, 13 Jan 2022 16:16:49 +0100 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 6CA5419DFF for ; Thu, 13 Jan 2022 16:16:49 +0100 (CET) Received: from localhost ([::1]:35202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n81qK-0005xm-1Q for larch@yhetil.org; Thu, 13 Jan 2022 10:16:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n81f0-0007G6-W9 for bug-guix@gnu.org; Thu, 13 Jan 2022 10:05:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n81ev-00042S-NA for bug-guix@gnu.org; Thu, 13 Jan 2022 10:05:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n81ev-0004Er-J2 for bug-guix@gnu.org; Thu, 13 Jan 2022 10:05:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52533: guix deploy breaks SSH access with a PAM error Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 13 Jan 2022 15:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52533 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mathieu Othacehe Received: via spool by 52533-submit@debbugs.gnu.org id=B52533.164208626616228 (code B ref 52533); Thu, 13 Jan 2022 15:05:01 +0000 Received: (at 52533) by debbugs.gnu.org; 13 Jan 2022 15:04:26 +0000 Received: from localhost ([127.0.0.1]:34236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n81eM-0004Dg-BU for submit@debbugs.gnu.org; Thu, 13 Jan 2022 10:04:26 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n81eK-0004DO-6b for 52533@debbugs.gnu.org; Thu, 13 Jan 2022 10:04:25 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4D2D12A0; Thu, 13 Jan 2022 16:04:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n09gJ4S1sWin; Thu, 13 Jan 2022 16:04:17 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D2F3222E; Thu, 13 Jan 2022 16:04:15 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87czlx88ez.fsf@gmail.com> <87ilvor3sn.fsf@gnu.org> <87r19bom0r.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 =?UTF-8?Q?Niv=C3=B4se?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 13 Jan 2022 16:04:15 +0100 In-Reply-To: <87r19bom0r.fsf@gnu.org> (Mathieu Othacehe's message of "Thu, 13 Jan 2022 13:31:00 +0100") Message-ID: <87tue77k40.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 4D2D12A0 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,debbugs.gnu.org] 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: 52533@debbugs.gnu.org, Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642087009; 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: content-transfer-encoding:content-transfer-encoding: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=wEyHzHciYEMOZAXCQtfKVZZWzIVqPsV1nuDa8bD97Hs=; b=MHZhS8PETgLUjN5DA3CpjveY7beCYGdmvsCrygwzTKmqu7FG32BBG78uy2+rtdfGmTp3Ux OLbn79F6XpkghvZ7V8lDhNCZ+6+1KdKD+HBNP5+WVbVJNRVhVeZgtYAzDKTO948Mk/w+Ki sNDJ6I/6LFA1NcGFmAot4F6RwqruLiT5tQSYX6qETQxgL4IewNQ2oTJJ7UIkE/c42SIRzJ bqkQQsP5bPyj9KFZUM5YPoKnSpnAawfhXlk8I1ry1j0YXcVa1W45eU3RjpOMbA3io6jLeH 0lM5Jec+xcRl5zm07etsOyyQWXe5aFcJOGUFbBmeCHAcYJdUDjf4sMjKFzzxoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642087009; a=rsa-sha256; cv=none; b=kU1llrXAzieH5lB/QRjXV3AZqgIL9dpoIVP3pUfEa6FVJ9tlKiBmgktzEzB6y2ai2CsJCp MGyk17DxpHdC99lMkN5gAV3CnppiCT46oDdNwNoqT2ve7MGwQeBLU40+iCRqxMfdTWmyxy lZcCOOhrDCkKBQ09xJcWKB1w5HAED5BYScCXmK9TJpNJWA0vynarU+/mIxC0kUqpDrUR1j HOv0UtPCz7BpHjP3CM+sxEQ/Y5xRgJME26bD7KrYFqXQHP2OJ3Y2WKY+4QgbAroZZ2U6FD vLfwWInzZysXpexdRbGFyHl8NBKRZDrsk02l0nOt6QfJkJZ5abPvBvMwtzQ4YQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6CA5419DFF X-Spam-Score: -4.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: biKnR5mYun+E Hi, Mathieu Othacehe skribis: >> This sounds a lot like this: >> >> https://issues.guix.gnu.org/32182#1 > > I was just kicked out of my own server due to this PAM/SSH issue. It > happens quite frequently here. Time for a fix :). Note that =E2=80=98guix deploy=E2=80=99 now opens a single SSH session, sta= rting from 7f20e59a13a6acc3331e04185b8f1ed2538dcd0a, which might help mitigate the problem. > Regarding the two potential solutions that you proposed in 2018, are > they still actual? If yes, I could maybe try to implement the second > suggestion: introducing service chain-loading. Service chain-loading was implemented in the Shepherd a few years ago. However, it doesn=E2=80=99t really help; consider these two scenario: =E2=80=A2 You do =E2=80=98guix system reconfigure && herd restart term-tt= y1=E2=80=99. In that case, all is good: =E2=80=98term-tty1=E2=80=99, will run the new =E2=80= =98mingetty=E2=80=99 process (post-glibc upgrade, thanks to service chain-loading) and =E2=80=98logi= n=E2=80=99 will happily load the .so files listed in /etc/pam.d/login (also post-glibc upgrade). =E2=80=A2 You run =E2=80=98guix system reconfigure=E2=80=99 but do not re= start =E2=80=98term-tty1=E2=80=99, =E2=80=98sshd=E2=80=99, and all the other services that depend on PAM: = these pre-glibc upgrade programs will try dlopening the post-glibc upgrade PAM plugins, which will break. The crux of the problem rather is the global /etc/pam.d: it=E2=80=99s valid= for pre-glibc upgrade programs, or for post-glibc upgrade programs, but not both. FHS distros have a similar problem though; how do they handle it? Do they force services to be restarted when glibc is upgraded, or something along these lines? In our case, suppose libpam honors $PAM_DIRECTORY; we could tweak each PAM-using Shepherd service (login, sshd, etc.) so that it sets PAM_DIRECTORY=E2=80=A6 but how would we get the PAM_DIRECTORY value for the= OS being configured? Tricky! We could maybe sidestep the issue altogether with socket-activated services: they=E2=80=99d be started on-demand, so the second scenario above would be unlikely. But getting there is quite a bit of work=E2=80=A6 Ludo=E2=80=99.