Skip to content

Commit

Permalink
armbian.sh: Make sure, passwordless login is disabled for root
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Knöppler <[email protected]>
  • Loading branch information
theCalcaholic committed Apr 28, 2024
1 parent f1b0ae4 commit 636d0da
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 0 additions & 1 deletion bin/ncp-check-version
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

set -x
# update latest available version in /var/run/.ncp-latest-version

TEMPDIR="$( mktemp -d /tmp/ncp-check.XXXXXX || ( echo "Failed to create temp dir. Exiting" >&2; exit 1 ) )"
Expand Down
1 change: 1 addition & 0 deletions bin/ncp-dist-upgrade.d/debian-11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ then
fi
apt-get full-upgrade -y

apt-get install -y --no-install-recommends exfatprogs
restore_maintenance_mode
cfg="$(jq "." "$NCPCFG")"
cfg="$(jq ".release = \"bookworm\"" <<<"$cfg")"
Expand Down
1 change: 1 addition & 0 deletions build/armbian/armbian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ systemctl disable ssh
rm -f /etc/systemd/system/[email protected]/override.conf
rm -f /etc/systemd/system/[email protected]/override.conf
rm -f /root/.not_logged_in_yet
sed -i 's|^root::|root:x:|' /etc/passwd

basename "$IMG" | tee /usr/local/etc/ncp-baseimage

Expand Down
3 changes: 2 additions & 1 deletion ncp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ EOF
EOF

echo '
NCP is not activated yet. Please enter this instances local IP address in your webbrowser to complete activation.' >> /etc/issue
NCP is not activated yet. Please enter https://nextcloudpi.local or this instance'"'"'s local IP address in your webbrowser to complete activation.
' >> /etc/issue
chmod a+x /etc/update-motd.d/*

## HOSTNAME AND mDNS
Expand Down
7 changes: 7 additions & 0 deletions updates/1.54.0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

if getent passwd "$LOGNAME" | grep -e 'root' | grep -e '/usr/sbin/nologin'
then
chsh -s /bin/bash root
passwd -l root
fi

0 comments on commit 636d0da

Please sign in to comment.