Improved security, builds have timestamps, first-time improvements

Added the unix timestamp for when the build was built to the file name
Disabled no password on the pi account for sudo actions

Fixed a stupid mistake where I piped a function into bash instead of
the void
This commit is contained in:
Logan G 2020-08-12 02:59:46 -06:00
parent ffdd76098f
commit 106c1a0e95
Signed by: logan
GPG key ID: E328528C921E7A7A
3 changed files with 5 additions and 2 deletions

View file

@ -153,7 +153,7 @@ fi
export USE_QEMU="${USE_QEMU:-0}" export USE_QEMU="${USE_QEMU:-0}"
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}" export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-$(date +%s)-${IMG_NAME}"}"
export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
export SCRIPT_DIR="${BASE_DIR}/scripts" export SCRIPT_DIR="${BASE_DIR}/scripts"

View file

@ -57,3 +57,6 @@ usermod --pass='*' root
EOF EOF
rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key* rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key*
rm -f "${ROOTFS_DIR}/etc/sudoers.d/010_pi-nopasswd" # Fuck you :)
echo "%sudo ALL=(ALL:ALL) ALL" > /etc/sudoers.d/group

View file

@ -57,7 +57,7 @@ screen_timeout() {
EOF EOF
} }
: << EOF << EOF
main_menu () { main_menu () {
local MAINMENU=$(whiptail --separate-output --nocancel --title "Pi Setup" --menu "" 10 50 0 \ local MAINMENU=$(whiptail --separate-output --nocancel --title "Pi Setup" --menu "" 10 50 0 \
"1" "Setup Networking" \ "1" "Setup Networking" \