diff options
author | Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> | 2022-10-03 21:59:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 21:59:34 +0300 |
commit | d9be4e17b4cd8b95b8562957fe563b93cd07c55b (patch) | |
tree | 3325086b7d87b0a5229873947466e39c19ef9608 | |
parent | c5c87300f5db39f9e3c4de9dbc55c4853ee9c300 (diff) | |
parent | da1295dd8222e20fac247965bb59dbac05b83321 (diff) |
Merge pull request #1604 from nextcloud/fix/pi-user-disabled
SSH.sh: Reenable pi user if selected in SSH
-rw-r--r-- | bin/ncp/NETWORKING/SSH.sh | 3 | ||||
-rwxr-xr-x | build/build-SD-rpi.sh | 5 | ||||
-rw-r--r-- | etc/ncp-config.d/dnsmasq.cfg | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/bin/ncp/NETWORKING/SSH.sh b/bin/ncp/NETWORKING/SSH.sh index 182b5978..9092978b 100644 --- a/bin/ncp/NETWORKING/SSH.sh +++ b/bin/ncp/NETWORKING/SSH.sh @@ -38,6 +38,9 @@ configure() id "$USER" &>/dev/null || { echo "$USER doesn't exist"; return 1; } echo -e "$PASS\n$CONFIRM" | passwd "$USER" || return 1 + # Reenable pi user + [[ "$USER" == "pi" ]] && usermod pi -s /bin/bash + # Check for insecure default pi password ( taken from old jessie method ) # TODO Due to Debian bug #1003151 with mkpasswd this feature is not working properly at the moment - https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1837456.html #local SHADOW SALT HASH diff --git a/build/build-SD-rpi.sh b/build/build-SD-rpi.sh index 429133ff..d7cc0b70 100755 --- a/build/build-SD-rpi.sh +++ b/build/build-SD-rpi.sh @@ -80,11 +80,6 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ sed -i 's|^#PermitRootLogin .*|PermitRootLogin no|' /etc/ssh/sshd_config # default user 'pi' for SSH - cfg="$(jq '.' etc/ncp-config.d/SSH.cfg)" - cfg="$(jq '.params[1].value = "pi"' <<<"$cfg")" - cfg="$(jq '.params[2].value = "raspberry"' <<<"$cfg")" - cfg="$(jq '.params[3].value = "raspberry"' <<<"$cfg")" - echo "$cfg" > /usr/local/etc/ncp-config.d/SSH.cfg # cleanup source etc/library.sh && run_app_unsafe post-inst.sh diff --git a/etc/ncp-config.d/dnsmasq.cfg b/etc/ncp-config.d/dnsmasq.cfg index 594023bf..f14da6fc 100644 --- a/etc/ncp-config.d/dnsmasq.cfg +++ b/etc/ncp-config.d/dnsmasq.cfg @@ -3,7 +3,7 @@ "name": "Dnsmasq, to serve names of local machines which are not in the global DNS", "title": "dnsmasq", "description": "DNS server with cache", - "info": "Remember to point your PC and devices DNS or\nyour router DNS to your Raspberry Pi IP", + "info": "Remember to point your PC and devices DNS or\nyour router DNS to your NCP IP", "infotitle": "", "params": [ { |