From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#33422: /etc/passwd on GuixSD can end up containing default home directories Date: Mon, 19 Nov 2018 17:19:24 +0100 Message-ID: <87muq5yr8z.fsf@gnu.org> References: <87wopam47t.fsf@gnu.org> <20181118224448.GB25252@jasmine.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOmHQ-0000fS-LM for bug-guix@gnu.org; Mon, 19 Nov 2018 11:20:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOmHK-0000vA-Tz for bug-guix@gnu.org; Mon, 19 Nov 2018 11:20:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:56855) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gOmHK-0000v4-Qd for bug-guix@gnu.org; Mon, 19 Nov 2018 11:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gOmHK-0007es-Jv for bug-guix@gnu.org; Mon, 19 Nov 2018 11:20:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20181118224448.GB25252@jasmine.lan> (Leo Famulari's message of "Sun, 18 Nov 2018 17:44:48 -0500") 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: Leo Famulari Cc: 33422@debbugs.gnu.org Leo Famulari skribis: > On Sun, Nov 18, 2018 at 11:05:26PM +0100, Ludovic Court=C3=A8s wrote: >> On IRC, fps reported this issue: their user account was declared like >> this: >>=20 >> 26 (users (cons (user-account=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> 27 (name "fps")=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> 28 (comment "fps")=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> 29 (group "users")=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> 30 (supplementary-groups '("wheel" "netdev"=20=20 >> 31 "audio" "video"))=20 >> 32 (home-directory "/home/bob")) ;<--- notice =E2=80= =9Cbob=E2=80=9D! >>=20 >> =E2=80=A6 yet /etc/passwd would refer to /home/fps for user =E2=80=9Cfps= =E2=80=9D (this is on a >> fresh GuixSD 0.15.0 install.) >>=20 >> This in turn would prevent logging in as =E2=80=9Cfps=E2=80=9D because /= home/fps didn=E2=80=99t >> exist (meaning the =E2=80=98user-homes=E2=80=99 Shepherd service created= /home/bob, not >> /home/fps.) > > It slightly obscures a part of config.scm that is otherwise > straightforward, but I do this: > > (home-directory (string-append "/home/" name)) > > ... which would have avoided the issue. Maybe the value of > home-directory should be implicit when unspecified. > > But, that is missing the point, which I think is that home directories > are not being handled in a consistent and unified way. Exactly, that home directory was a typo, but the point of this bug is that non-default home directories were not correctly handled. Ludo=E2=80=99.