Lock root account to prevent VM access (thanks @BitcoinBeachBR)

This commit is contained in:
Taylor Helsper 2022-05-08 22:57:40 -05:00
parent 8cc0ea55fe
commit a5e9a4e120
2 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,7 @@ if ! skip_base_upgrades ; then
# User updates and settings # User updates and settings
adduser admin bitcoin adduser admin bitcoin
grep "joinmarket" /etc/sudoers || (echo 'joinmarket ALL=(ALL) NOPASSWD:ALL' | EDITOR='tee -a' visudo) grep "joinmarket" /etc/sudoers || (echo 'joinmarket ALL=(ALL) NOPASSWD:ALL' | EDITOR='tee -a' visudo)
passwd -l root
# Migrate from version file to version+install combo # Migrate from version file to version+install combo
/usr/bin/mynode_migrate_version_files.sh /usr/bin/mynode_migrate_version_files.sh

View File

@ -126,6 +126,7 @@ source /tmp/upgrade/out/rootfs_*/usr/share/mynode/mynode_app_versions.sh
# Create any necessary users # Create any necessary users
useradd -m -s /bin/bash bitcoin || true useradd -m -s /bin/bash bitcoin || true
useradd -m -s /bin/bash joinmarket || true useradd -m -s /bin/bash joinmarket || true
passwd -l root
# Setup bitcoin user folders # Setup bitcoin user folders
mkdir -p /home/bitcoin/.mynode/ mkdir -p /home/bitcoin/.mynode/