-
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SSH.sh: Enable user when configuring SSH
Signed-off-by: thecalcaholic <[email protected]>
- Loading branch information
1 parent
ddc04e6
commit 9975742
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ is_active() | |
systemctl -q is-enabled ssh &>/dev/null | ||
} | ||
|
||
configure() | ||
configure() | ||
{ | ||
[[ $ACTIVE != "yes" ]] && { | ||
systemctl stop ssh | ||
|
@@ -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 | ||
} | ||
|
||
|
@@ -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 | ||
|