Skip to content

Commit 21b7fe7

Browse files
committed
SSH: cannot check for default password because of Debian bug #1003151
Signed-off-by: nachoparker <[email protected]>
1 parent f473f73 commit 21b7fe7

File tree

4 files changed

+36
-32
lines changed

4 files changed

+36
-32
lines changed

bin/ncp/BACKUPS/nc-snapshot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ configure()
3232
return 1
3333
}
3434

35-
btrfs-snp $MOUNTPOINT manual $LIMIT 0 ../ncp-snapshots
35+
btrfs-snp "${MOUNTPOINT}" manual "${LIMIT}" 0 ../ncp-snapshots
3636

3737
restore_maintenance_mode
3838
}

bin/ncp/NETWORKING/SSH.sh

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,40 @@ configure()
3939
echo -e "$PASS\n$CONFIRM" | passwd "$USER" || return 1
4040

4141
# Check for insecure default pi password ( taken from old jessie method )
42-
local SHADOW="$( grep -E '^pi:' /etc/shadow )"
43-
test -n "${SHADOW}" && {
44-
local SALT=$(echo "${SHADOW}" | sed -n 's/pi:\$6\$//;s/\$.*//p')
42+
# TODO Due to Debian bug #1003151 with mkpasswd this feature is not working properly at the moment - https://www.mail-archive.com/[email protected]/msg1837456.html
43+
#local SHADOW SALT HASH
44+
#SHADOW="$( grep -E '^pi:' /etc/shadow )"
45+
#test -n "${SHADOW}" && {
46+
#SALT=$(awk -F[:$] '{print $5}' <<<"${SHADOW}")
4547

46-
[[ "${SALT}" != "" ]] && {
47-
local HASH=$(mkpasswd -msha-512 raspberry "$SALT")
48-
grep -q "${HASH}" <<< "${SHADOW}" && {
49-
systemctl stop ssh
50-
systemctl disable ssh
51-
echo "The user pi is using the default password. Refusing to activate SSH"
52-
echo "SSH disabled"
53-
return 1
54-
}
55-
}
56-
}
48+
#[[ "${SALT}" != "" ]] && {
49+
#HASH=$(mkpasswd -myescrypt raspberry "${SALT}")
50+
#grep -q "${HASH}" <<< "${SHADOW}" && {
51+
#systemctl stop ssh
52+
#systemctl disable ssh
53+
#echo "The user pi is using the default password. Refusing to activate SSH"
54+
#echo "SSH disabled"
55+
#return 1
56+
#}
57+
#}
58+
#}
5759

5860
# Check for insecure default root password ( taken from old jessie method )
59-
local SHADOW="$( grep -E '^root:' /etc/shadow )"
60-
test -n "${SHADOW}" && {
61-
local SALT=$(echo "${SHADOW}" | sed -n 's/root:\$6\$//;s/\$.*//p')
61+
#SHADOW="$( grep -E '^root:' /etc/shadow )"
62+
#test -n "${SHADOW}" && {
63+
#SALT=$(awk -F[:$] '{print $5}' <<<"${SHADOW}")
6264

63-
[[ "${SALT}" != "" ]] && {
64-
local HASH=$(mkpasswd -msha-512 1234 "$SALT")
65-
grep -q "${HASH}" <<< "${SHADOW}" && {
66-
systemctl stop ssh
67-
systemctl disable ssh
68-
echo "The user root is using the default password. Refusing to activate SSH"
69-
echo "SSH disabled"
70-
return 1
71-
}
72-
}
73-
}
65+
#[[ "${SALT}" != "" ]] && {
66+
#HASH=$(mkpasswd -myescrypt 1234 "${SALT}")
67+
#grep -q "${HASH}" <<< "${SHADOW}" && {
68+
#systemctl stop ssh
69+
#systemctl disable ssh
70+
#echo "The user root is using the default password. Refusing to activate SSH"
71+
#echo "SSH disabled"
72+
#return 1
73+
#}
74+
#}
75+
#}
7476

7577
# Enable
7678
chage -d 0 "$USER"

changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2-
[v1.46.7](https://github.com/nextcloud/nextcloudpi/commit/bd49019) (2022-03-04) nc-hdd-monitor: fix Bullseye service name
2+
[v1.46.8](https://github.com/nextcloud/nextcloudpi/commit/dc7046b) (2022-03-04) SSH: cannot check for default password because of Debian bug #1003151
3+
4+
[v1.46.7](https://github.com/nextcloud/nextcloudpi/commit/f473f73) (2022-03-04) nc-hdd-monitor: fix Bullseye service name
35

46
[v1.46.6](https://github.com/nextcloud/nextcloudpi/commit/c9610e4) (2022-03-03) ncp-dist-upgrade: fix VM grub-pc issue
57

tag_and_push.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
set -e
1818

19-
TAG="$@"
19+
TAG="$*"
2020

2121
source build/buildlib.sh
22-
git tag "$TAG"
22+
git tag -f "$TAG"
2323
generate_changelog
2424
git add changelog.md
2525
git commit -C HEAD --amend

0 commit comments

Comments
 (0)