From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GN++HDdCrWYugAEAqHPOHw:P1 (envelope-from ) for ; Fri, 02 Aug 2024 20:31:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id GN++HDdCrWYugAEAqHPOHw (envelope-from ) for ; Fri, 02 Aug 2024 22:31:51 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qt+asgQX; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722630711; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fNCLCqHiE29uy2C1g/tMSHBjHBGFznnTaSpVlleEhGs=; b=nPMvV8/4mQqIOsqo1T2UGrZtrIyKVS3XtNUyhGdQdjDrbmSE5fzMOTY0sQRHaquocukmES Lj3UWoNIzs9LmdKlQqB3MT7kFQS0Y5oxnnsCGrntLdzQ1OxrsUbEV24zqLT/WDTAbWRsUq bZFsr710cuooSFu5ZznQkvjFBS0nBxzXYrI9AE+M5Km91eoKeE/IoDY39TaKLkQmHwJflD 0hpYHH0/OE4Vqk/spnb8S4PLKzRxx8Y/EAWvnogg9hM5GOOU98321ELuloEOd9JTtl+Dmd TkcTAaJ2VQ1nNKpJM9oZLsxV24Zy+tKW8a4sUqwwqOohnESikRakLgAx/ongxw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722630711; a=rsa-sha256; cv=none; b=Jz3GVR4PbBiVpIocoGOOAZXl9KiWPB8qcChBiK6E1C6tLIrmzOGHtcINH0+zIWa1tr1b7C VVdbn1juKajVW2w8fK2S+2AngRZspi7sIXKh6KoZItqwved29KOgTeJmDLsaET0yOYwwI2 zLfTdoL4KNxP2y0mWF2W4FZMFbcGp0dz5blAfOxhjzTU0lMXh6Ep9ka19p3V/5kakFyKlA D17mtfWgXvgm1+iR71vwqt/DRunEKVGm2l9x0i6hhNJvUtrTu03QpBjf7hhchF9UTUf04F ARVSVzbhD2P66FUxrlncXpB3LPVSgKsmif8sgnRZrEUCMU/oIc6NZNcjgpL6eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=qt+asgQX; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" 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 F29AE65B53 for ; Fri, 2 Aug 2024 22:31:50 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZyvl-0002K2-10; Fri, 02 Aug 2024 16:31:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZyvi-0002Jq-P6 for help-guix@gnu.org; Fri, 02 Aug 2024 16:31:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZyvg-0004hq-Lg for help-guix@gnu.org; Fri, 02 Aug 2024 16:31:14 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9139F240107 for ; Fri, 2 Aug 2024 22:31:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1722630666; bh=PxdR07v+zqAFj/EisWoQcEcLRIMQNW6x0bqEqSph534=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=qt+asgQX6VXXCP2Mq9ECUsYMMvfMubbTnE3y0OlMsZ8iDvFQYgK1O1yLdG/sUh59p XAkjZWXtLzmhp9ye+CxdTn5Mu0pvpaOSxK7Onu69VXUVkmsbsUHHHfIFIkyp5XUGZi tbflNNgI+8Qx4fDiQCdXvEtxJ8zXRs1IGdxn81xTomWxiF6gsg8ryOzmul/XII7p6J 5XdecUGI3h4pfU/ECRWXumWi/dpeAEHEzI/L2JEOtQU2fmVK5Ab14NNRcsYwVzFGvM F/GhqaCXP3gx/N+3wp8u2JEnN4WcSUgpvoTKllMjsHTVVzj4RteXHs97/A5fAM3brS Bh6SFEYdis1Ug== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WbHXl6trHz6v0c for ; Fri, 2 Aug 2024 22:31:03 +0200 (CEST) From: Fredrik Salomonsson To: help-guix Subject: Question about PAM service Date: Fri, 02 Aug 2024 20:31:01 +0000 Message-ID: <87zfpu3bwa.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: F29AE65B53 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -10.16 X-Spam-Score: -10.16 X-TUID: Sq916cErWE+/ Hello Guix, I recently changed my setup at home for work. Now I have a laptop to do my work on and my desktop (that's running Guix) for my personal notes etc. I still jump between the two through out the day. It is a bit annoying to have to type in my password every time I switch to my desktop to unlock swaylock. I got an u2f compatible USB key which got me thinking. I might be able to set it up that swaylock requires either password or the u2f key. That way I don't need to type in my password to unlock my desktop all the time. Although it is a bit unclear if swaylock can handle this or not. However it does not look supertrivial to modify a PAM service. So before I venture down this path I figured it might be good to ask the community to see if someone has done something similar? >From what I have gathered so far I need to disable the PAM services for `screen-locker-service`. Something like this: ``` (service screen-locker-service-type (screen-locker-configuration (name "swaylock") (program (file-append swaylock "/bin/swaylock")) (using-pam? #f) (using-setuid? #f))) ``` Then define my own for swaylock using `unix-pam-service`. But grab the result from that and modify the `auth` section to add the pam-u2f module and also change the password from `required` to `sufficient`. Does that sound right? Or is there a better way of going about this? Thanks -- s/Fred[re]+i[ck]+/Fredrik/g