From 5de2d9e8a92ae0175ebf63379eda56353f404e57 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 11 Mar 2019 14:12:17 +0000 Subject: [PATCH] e2e Use `useradd`'s `--shell` option ... in preference to `chsh`, since in recent alpine 3.9.2 images that can fail with: Password: chsh: PAM: Authentication token manipulation error Which seems to relate to the use of `!` as the password for `root` in `/etc/shadow`gq Signed-off-by: Ian Campbell --- e2e/testdata/Dockerfile.connhelper-ssh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e/testdata/Dockerfile.connhelper-ssh b/e2e/testdata/Dockerfile.connhelper-ssh index acf0620495..2ac92b7ca4 100644 --- a/e2e/testdata/Dockerfile.connhelper-ssh +++ b/e2e/testdata/Dockerfile.connhelper-ssh @@ -1,10 +1,9 @@ FROM docker:test-dind RUN apk --no-cache add shadow openssh-server && \ groupadd -f docker && \ - useradd -m penguin && \ + useradd -m --shell /bin/sh penguin && \ usermod -aG docker penguin && \ usermod -p $(head -c32 /dev/urandom | base64) penguin && \ - chsh -s /bin/sh penguin && \ ssh-keygen -A # workaround: ssh session excludes /usr/local/bin from $PATH RUN ln -s /usr/local/bin/docker /usr/bin/docker