Skip to content
Snippets Groups Projects
Commit 639f301c10a4 authored by DJ Mountney's avatar DJ Mountney
Browse files

Merged branch "hufa/omnibus-gitlab-master" into "master"

MR: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4953
parent 6c81e7db5755
No related branches found
No related tags found
1 merge request!26GitLab 13.9
---
title: configure sshd and git account so that pam is not used any longer in docker
merge_request: 4953
author: Fnordpol
type: fixed
......@@ -17,8 +17,7 @@
tzdata \
nano \
less \
&& rm -rf /var/lib/apt/lists/* \
&& sed 's/session\s*required\s*pam_loginuid.so/session optional pam_loginuid.so/g' -i /etc/pam.d/sshd
&& rm -rf /var/lib/apt/lists/*
# Remove MOTD
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
......
......@@ -46,7 +46,9 @@
groupadd -g 991 gitlab-consul
# Create accounts
useradd -m -u 998 -g git -m -s /bin/sh -d /var/opt/gitlab git
## The git account is created with * as crypted password as ssh treats the account as locked if it has a !
## Issue #5891 https://gitlab.com/gitlab-org/omnibus-gitlab
useradd -m -u 998 -g git -p '*' -m -s /bin/sh -d /var/opt/gitlab git
useradd -m -u 999 -g gitlab-www -m -s /bin/false -d /var/opt/gitlab/nginx gitlab-www
useradd -m -u 997 -g gitlab-redis -m -s /bin/false -d /var/opt/gitlab/redis gitlab-redis
useradd -m -u 996 -g gitlab-psql -m -s /bin/sh -d /var/opt/gitlab/postgresql gitlab-psql
......
......@@ -15,5 +15,4 @@
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check git %u %k
AuthorizedKeysCommandUser git
# Fix: User username not allowed because account is locked
# With "UsePAM yes" the "!" is seen as a password disabled account and not fully locked so ssh public key login works
......@@ -19,5 +18,7 @@
# With "UsePAM yes" the "!" is seen as a password disabled account and not fully locked so ssh public key login works
UsePAM yes
# Please make sure that the account is created without passwordlogin ("*" in /etc/shadow) or configure pam.
# Issue #5891 https://gitlab.com/gitlab-org/omnibus-gitlab
UsePAM no
# Disabling use DNS in ssh since it tends to slow connecting
UseDNS no
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment