diff --git a/Dockerfile b/Dockerfile index 0d7087f..0e902a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ MAINTAINER Adrian Dvergsdal RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssh-server RUN mkdir -p /var/run/sshd -RUN addgroup --system sftp ADD . /root WORKDIR /root diff --git a/run b/run index d443a7a..a79cf86 100644 --- a/run +++ b/run @@ -7,11 +7,11 @@ for userData in "${users[@]}"; do user="${data[0]}" pass="${data[1]}" - useradd -G sftp $user + useradd $user echo "$user:$pass" | chpasswd chown root:root /home/$user chmod 755 /home/$user - chown -R $user:sftp /home/$user/* + chown -R $user:users /home/$user/* done # Run SSH diff --git a/sshd_config b/sshd_config index 4a21d09..46d0821 100644 --- a/sshd_config +++ b/sshd_config @@ -1,11 +1,7 @@ PermitRootLogin no -#ChallengeResponseAuthentication no -UsePAM no Subsystem sftp internal-sftp - -Match group sftp - ChrootDirectory %h - X11Forwarding no - AllowTcpForwarding no - ForceCommand internal-sftp +ChrootDirectory %h +X11Forwarding no +AllowTcpForwarding no +ForceCommand internal-sftp