unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Edouard Klein <edk@beaver-labs.com>
To: 41575@debbugs.gnu.org
Subject: bug#41575: Container with openssh-service requires sshd user on the host
Date: Thu, 28 May 2020 11:20:25 +0200	[thread overview]
Message-ID: <87mu5s2z6u.fsf@alice.lan> (raw)

Dear guix,

This is a funny one.

Consider this minimal operating system definition:
-----------
(use-modules (gnu))
(use-service-modules ssh)

(operating-system
  (host-name "MinimalSSH")
  (timezone "Europe/Paris")
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)))
  (file-systems %base-file-systems)
  (services (append (list 
                     (service openssh-service-type
                              (openssh-configuration
                               (port-number 2222))))
                    %base-services)))
-----------

If I try to create a container (with network of course):

guix system container ~/src/gendscraper/minimal_openssh.scm --network

And run the container

sudo /gnu/store/6dvy8acvzkzfba8hjf4nfc3ps2rwns5j-run-container

I get the error I pasted at the end of this email.

If, however, I create a sshd user on the host, it runs without a hitch
and I can talk to the ssh server on localhost:2222

Funny things:
- It will run if I remove the --network (but then I can't connect to the
ssh server, of course)
- It will run if I userdel sshd, until I reboot

The ncsd daemon is running on the host.

My goal with guix containers is to avoid having to make any
configuration on the foreign host (apart from installing guix),
is this normal that the sshd user has to be present for the container
to run the ssh daemon ?

If it is, how can I know in advance which service requires which
configuration on the host ?

Thanks in advance for any help, please do not hesitate to ask for more
information about my config (Arch) if need be.

Cheers,

Edouard.

---------------
sudo /gnu/store/6dvy8acvzkzfba8hjf4nfc3ps2rwns5j-run-container
guile: warning: failed to install locale
system container is running as PID 3934
Run 'sudo guix container exec 3934 /run/current-system/profile/bin/bash --login'
or run 'sudo nsenter -a -t 3934' to get a shell into it.

making '/gnu/store/ml63vj43bv4lrmwdvpm6jqyya24z6zkr-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/a4d90ypz1xylh97ff2b4ysj33hwnmfva-etc...
Backtrace:
          12 (primitive-load "/gnu/store/6dvy8acvzkzfba8hjf4nfc3ps2r…")
In gnu/build/linux-container.scm:
    297:8 11 (call-with-temporary-directory #<procedure 7f36d0d122d0…>)
   325:16 10 (_ _)
     62:6  9 (call-with-clean-exit _)
In unknown file:
           8 (primitive-load "/gnu/store/ml63vj43bv4lrmwdvpm6jqyya24…")
In ice-9/eval.scm:
    619:8  7 (_ #f)
In unknown file:
           6 (primitive-load "/gnu/store/zdqjch5xknlhp6dvnl6vdrlfnbm…")
In srfi/srfi-1.scm:
    640:9  5 (for-each #<procedure primitive-load (_)> _)
In unknown file:
           4 (primitive-load "/gnu/store/y19c6kipzqigz15v4hvy53x2vaz…")
In gnu/build/activation.scm:
    145:2  3 (activate-users+groups _ _)
In srfi/srfi-1.scm:
    640:9  2 (for-each #<procedure make-home-directory (user)> _)
In gnu/build/activation.scm:
   115:16  1 (make-home-directory #<<user-account> name: "sshd" pass…>)
In unknown file:
           0 (getpw "sshd")

ERROR: In procedure getpw:
In procedure getpw: entry not found




             reply	other threads:[~2020-05-28  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  9:20 Edouard Klein [this message]
2020-08-25  3:15 ` bug#41575: Container with openssh-service requires sshd user on the host conjaroy
2020-09-09  0:31   ` conjaroy
2020-09-13 10:39     ` edk
2020-09-13 15:08       ` conjaroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu5s2z6u.fsf@alice.lan \
    --to=edk@beaver-labs.com \
    --cc=41575@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).