Skip to content

Commit

Permalink
SSH.sh: Enable user when configuring SSH
Browse files Browse the repository at this point in the history
Signed-off-by: thecalcaholic <[email protected]>
  • Loading branch information
theCalcaholic committed Oct 3, 2022
1 parent ddc04e6 commit 9975742
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/ncp/NETWORKING/SSH.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ is_active()
systemctl -q is-enabled ssh &>/dev/null
}

configure()
configure()
{
[[ $ACTIVE != "yes" ]] && {
systemctl stop ssh
Expand All @@ -29,8 +29,8 @@ configure()
echo "Refusing to use the default Raspbian user and password. It's insecure"
return 1
}
[[ "$USER" == "root" ]] && [[ "$PASS" == "1234" ]] && {
echo "Refusing to use the default Armbian user and password. It's insecure"
[[ "$USER" == "root" ]] && {
echo "Refusing to use the root user for SSH. It's insecure"
return 1
}

Expand All @@ -39,7 +39,7 @@ configure()
echo -e "$PASS\n$CONFIRM" | passwd "$USER" || return 1

# Reenable pi user
[[ "$USER" == "pi" ]] && usermod pi -s /bin/bash
usermod "$USER" -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/[email protected]/msg1837456.html
Expand Down

0 comments on commit 9975742

Please sign in to comment.