unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41575: Container with openssh-service requires sshd user on the host
@ 2020-05-28  9:20 Edouard Klein
  2020-08-25  3:15 ` conjaroy
  0 siblings, 1 reply; 5+ messages in thread
From: Edouard Klein @ 2020-05-28  9:20 UTC (permalink / raw)
  To: 41575

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-13 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28  9:20 bug#41575: Container with openssh-service requires sshd user on the host Edouard Klein
2020-08-25  3:15 ` conjaroy
2020-09-09  0:31   ` conjaroy
2020-09-13 10:39     ` edk
2020-09-13 15:08       ` conjaroy

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).