From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AEozLZynPGAQWAAA0tVLHw (envelope-from ) for ; Mon, 01 Mar 2021 08:36:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0MQjKZynPGD9BAAAB5/wlQ (envelope-from ) for ; Mon, 01 Mar 2021 08:36:44 +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 D236E24E28 for ; Mon, 1 Mar 2021 09:36:43 +0100 (CET) Received: from localhost ([::1]:41300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGe2k-0000q8-Ak for larch@yhetil.org; Mon, 01 Mar 2021 03:36:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGe2W-0000po-Qv for help-guix@gnu.org; Mon, 01 Mar 2021 03:36:28 -0500 Received: from mout01.posteo.de ([185.67.36.65]:53084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGe2S-0005uj-DY for help-guix@gnu.org; Mon, 01 Mar 2021 03:36:28 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5EFF716005F for ; Mon, 1 Mar 2021 09:36:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1614587780; bh=de9Tmu0luCSF9DpLMDfuTU85rPLUrw2hq7M5ZCgjqqE=; h=From:To:Cc:Subject:Date:From; b=GFn3mMqVJaJ3ETKMBhFr17LzEOSA4Za4+oDWtPmMgqbSS6KqpAcHqhOQTNumtLpdw djhgA83Bd8k+2G8DA2VUWlmlghuaObYVMmwwhrJU8qeMN07g9BHKSN2quz24aBZtK/ BcXxdaEuCSVat0ro33SJnMEwHtQGA9EQYFs8Sixtv62TvmrfoyJnjcObjMLyhRTDGl ESkVy270JNBROLBxo8E2HAENcVZ1qrxprlLyHu43sdQstU5G7TcJlmBnciB86z6LKj XrrxgvhmVEhiP5RVnGmJuG6Lnxb0ljfho2nZgZRtfl/Co9TwU7zJ95v585N1Dc7h/y zc0WKfqbs2Hog== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dptrz3QwSz9rxY; Mon, 1 Mar 2021 09:36:18 +0100 (CET) References: <87zgznk5z9.fsf@web.de> User-agent: mu4e 1.4.15; emacs 27.1 From: Guillaume Le Vaillant To: "Dr. Arne Babenhauserheide" Subject: Re: How to create /home/user backed by LUKS device decrypted on login In-reply-to: <87zgznk5z9.fsf@web.de> Date: Mon, 01 Mar 2021 09:36:08 +0100 Message-ID: <87tupv8e4n.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=185.67.36.65; envelope-from=glv@posteo.net; helo=mout01.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_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614587804; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GbvvVJ8lsFk5UZdMR1MGzd9gjEz9uCWlPVEzazF0yFQ=; b=u19HL3GUtVo/juzvZIegfwEdzvJVRXz2AaSGocfmvpdXL7PG8TN9TtEPcn0FpsEgehzY0v MzhMG/2JIkVuz49wuDC9h8F/epbOQXVBEyb3HA5AHCqIbb+dAQ0GsQSWjj06S02tpsuJTY oHArnJJpFBbVuQgEa6LpqtpE+NBADW0hEXqiEQkpmHbeePlKIfAvlgn8sMNo287PV71lpz K5qoPBU3A5WZ3+3geBi3jHUUjdc3eJP+/ADlXR1KmHJIu4IBBoz54iE2XORARJYu81CAYo 3E+K3M+bmjgmU94Z+bQN4ev1Hazq9LzaddnFe/7OTCpBBxOWkPaTWBpG7puZgA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614587804; a=rsa-sha256; cv=none; b=QjAfWqV+EDR47P50xf0XYlhsIzAJL4DSo9DKHV4STTKx0ihxXysK3x6+w8poYBgKkQgLne LYJPfLHvRzKHE4DSdhG9JAosRwUO5U/QmD91xRS5jbsHjmsXIAXOfR5FQPhupwe6Ctdmuy 4kBKQTnzbLYcd9RprtD+R8x3IOAxxUTLISNfEJrjxsin0d01uTqEzo4ApmlLGCgNatMoPW +xRsKkk8qSJYUFG7n8RBLQblDFf7O+lJB8Be/JXg4NRYkWtNYaJmGn8UwrhceVD9BddYuW JJxcmlQCktSRO32sqVwjJEc14JUms9dHrLRbsQIVAEq2HvBtWqKRtPPiSynUuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GFn3mMqV; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -4.67 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=GFn3mMqV; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: D236E24E28 X-Spam-Score: -4.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: WJj18Tx8VWkq --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dr. Arne Babenhauserheide skribis: > Hi, > > The manual describes how to setup an encrypted root[1], but I got lost > trying to find out how to setup a user such that the device is opened at > login (with a prompt for the password) and closed at logout. > > I need the --allow-discards option to cryptsetup open, to be > equivalent to the following: > > sudo cryptsetup open --allow-discards --type luks /dev/nvmeXnXp1 my-u= ser > > I need the user-home to be encrypted, i.e. >=20=20=20=20=20 > mount LABEL=3Dmy-user /home/my-user > > I=E2=80=99d like to set this in my /etc/config.scm but currently I have to > decrypt before logging in. > > [1]: https://guix.gnu.org/manual/en/html_node/Keyboard-Layout-and-Network= ing-and-Partitioning.html > https://guix.gnu.org/manual/en/html_node/Mapped-Devices.html > > Best wishes, > Arne Hi, You can use the pam-mount service[1] to decrypt a user's home at login, but it will not create the encrypted volume automatically if it does not exist; you have to create it yourself. Also, if you create a LUKS2 volume, you can activate the discard feature with "cryptsetup --allow-discards --persistent open /dev/xxx path", and then you won't need to pass the "--allow-discards" option when mounting the volume anymore. [1]: https://guix.gnu.org/manual/en/html_node/PAM-Mount-Service.html --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYDyneA8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j8bpAEAmbMF6zzAJqFckefhMsFf+hQInyxn9BMTk6ox v8niLGYA/3glkzuMNl9sIimp596Z0hZzfnzW5VLK2iZUslO9K63B =uMi/ -----END PGP SIGNATURE----- --=-=-=--