You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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}")
45
47
46
-
[[ "${SALT}"!="" ]] && {
47
-
localHASH=$(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
+
#}
57
59
58
60
# Check for insecure default root password ( taken from old jessie method )
59
-
localSHADOW="$( grep -E '^root:' /etc/shadow )"
60
-
test -n "${SHADOW}"&& {
61
-
localSALT=$(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}")
62
64
63
-
[[ "${SALT}"!="" ]] && {
64
-
localHASH=$(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"
0 commit comments