From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#37162: =?UTF-8?Q?=E2=80=98guix?= pack -f =?UTF-8?Q?docker=E2=80=99?= creates an image without /etc/passwd Date: Mon, 26 Aug 2019 09:37:52 +0200 Message-ID: <87y2zg2x7z.fsf@inria.fr> References: <87r25c3p0e.fsf@inria.fr> <87a7bxexs6.fsf@gmail.com> <871rx9jjl2.fsf@elephly.net> <87y2zge11z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40049) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i29am-0002hm-ST for bug-guix@gnu.org; Mon, 26 Aug 2019 03:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i29ak-0005uC-R4 for bug-guix@gnu.org; Mon, 26 Aug 2019 03:39:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36693) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i29af-0005rQ-Tj for bug-guix@gnu.org; Mon, 26 Aug 2019 03:39:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i29af-0002zQ-OP for bug-guix@gnu.org; Mon, 26 Aug 2019 03:39:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87y2zge11z.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 26 Aug 2019 18:19:36 +0900") 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: Maxim Cournoyer Cc: 37162@debbugs.gnu.org Hi Maxim, Maxim Cournoyer skribis: > Ricardo Wurmus writes: > >> Hi Maxim, >> >>> Ludovic Court=C3=A8s writes: >>> >>>> =E2=80=98guix pack -f docker=E2=80=99 currently creates an image witho= ut >>>> /etc/{passwd,group,shadow}. >>>> >>>> It=E2=80=99s OK most of the time, but again it looks like a gratuitous= annoyance >>>> for those cases where having them around matters (that=E2=80=99s also = the reason >>>> why guix-daemon creates them.) >>> >>> Would that include the files required for PAM authentication to work >>> correctly? I remember struggling with this use case: using the Docker >>> image with CQFD wrapper, which must be able to create a user and >>> sudo'ing (or 'su') to it in the docker container. >> >> I wonder if at this point it wouldn=E2=80=99t be better to build a whole= system >> container. Isn=E2=80=99t that outside the scope of =E2=80=9Cguix pack= =E2=80=9D and rather a >> task for =E2=80=9Cguix system=E2=80=9D? I think so. > Probably! But then one has to wonder if adding some base files to `guix > pack' is not one of those slippery slopes where users come back > expecting more stuff to be there? > > What use case(s) exactly depend on the presence of the > /etc/{passwd,group,shadow} files? Generally, absent these files, getpw(3) and co. won=E2=80=99t give useful results, and some applications will behave poorly (e.g., the PS1 prompt in Bash can=E2=80=99t show the user name; =E2=80=98id=E2=80=99 fails). Most of the time it=E2=80=99s just a minor inconvenience. Ludo=E2=80=99.