diff options
Diffstat (limited to 'setup-sshd.in')
-rw-r--r-- | setup-sshd.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/setup-sshd.in b/setup-sshd.in index 280c015..9f1a0e2 100644 --- a/setup-sshd.in +++ b/setup-sshd.in @@ -77,7 +77,9 @@ fi $MOCK apk add --quiet $pkgs -if [ "$sshdchoice" = "openssh" ] && [ -z "$authorized_key" ]; then +users=$(awk -F: '{if ($3<65000 && $3 >= 1000) print $1}' \ + "$ROOT"/etc/passwd 2>/dev/null) +if [ "$sshdchoice" = "openssh" ] && [ -z "$authorized_key" ] && [ -z "$users" ]; then suggest=prohibit-password while [ -n "$interactive" ]; do ask "Allow root ssh login? ('?' for help)" "$suggest" |