diff --git a/pi-gen/config b/pi-gen/config index 1e1be88..e24fea0 100644 --- a/pi-gen/config +++ b/pi-gen/config @@ -11,4 +11,5 @@ FIRST_USER_NAME="dt" FIRST_USER_PASS="proxmark3" ENABLE_SSH=1 WPA_COUNTRY="US" +DISABLE_FIRST_BOOT_USER_RENAME=1 STAGE_LIST="stage0 stage1 stage2 stageDTPM3" diff --git a/pi-gen/pm3.config b/pi-gen/pm3.config index 1e1be88..e24fea0 100644 --- a/pi-gen/pm3.config +++ b/pi-gen/pm3.config @@ -11,4 +11,5 @@ FIRST_USER_NAME="dt" FIRST_USER_PASS="proxmark3" ENABLE_SSH=1 WPA_COUNTRY="US" +DISABLE_FIRST_BOOT_USER_RENAME=1 STAGE_LIST="stage0 stage1 stage2 stageDTPM3" diff --git a/pi-gen/stageDTPM3/00-install-packages/00-packages-nr b/pi-gen/stageDTPM3/00-install-packages/00-packages-nr index 8b77dd5..cdc3fd4 100644 --- a/pi-gen/stageDTPM3/00-install-packages/00-packages-nr +++ b/pi-gen/stageDTPM3/00-install-packages/00-packages-nr @@ -12,6 +12,7 @@ libpython3-dev libssl-dev hostapd dnsmasq +dhcpcd lighttpd iptables-persistent vnstat diff --git a/pi-gen/stageDTPM3/02-Wireless-AP/00-run-chroot.sh b/pi-gen/stageDTPM3/02-Wireless-AP/00-run-chroot.sh index e0a85eb..f998fae 100644 --- a/pi-gen/stageDTPM3/02-Wireless-AP/00-run-chroot.sh +++ b/pi-gen/stageDTPM3/02-Wireless-AP/00-run-chroot.sh @@ -30,7 +30,7 @@ mkdir /etc/raspap/hostapd mkdir /etc/raspap/lighttpd mkdir /etc/raspap/system -chown -R www-data:www-data /var/www/html +chown -R www-data:www-data /var/www/html chown -R www-data:www-data /etc/raspap mv installers/*log.sh /etc/raspap/hostapd @@ -43,8 +43,10 @@ cp installers/configport.sh /etc/raspap/lighttpd chown -c root:www-data /etc/raspap/lighttpd/*.sh mv installers/raspapd.service /lib/systemd/system +cp installers/dhcpcd.service /lib/systemd/system systemctl daemon-reload || true systemctl enable raspapd.service +systemctl enable dhcpcd.service cp /etc/hostapd/hostapd.conf ~/hostapd.conf.old || true cp config/default_hostapd /etc/default/hostapd || true diff --git a/pi-gen/stageDTPM3/03-ttyd/00-run-chroot.sh b/pi-gen/stageDTPM3/03-ttyd/00-run-chroot.sh index 13cb25b..c985771 100644 --- a/pi-gen/stageDTPM3/03-ttyd/00-run-chroot.sh +++ b/pi-gen/stageDTPM3/03-ttyd/00-run-chroot.sh @@ -16,6 +16,7 @@ esac cp ttyd.${model} /usr/local/bin/ttyd chown root:root /usr/local/bin/ttyd chmod a+x /usr/local/bin/ttyd +USER_UID=$(id -u dt) cat > /etc/systemd/system/ttyd-bash.service << EOF [Unit] @@ -28,7 +29,7 @@ WantedBy=multi-user.target [Service] User=dt WorkingDirectory=/home/dt -ExecStart=/usr/local/bin/ttyd -p 8000 -u dt -m 1 -c dt:proxmark3 /usr/bin/bash +ExecStart=/usr/local/bin/ttyd -p 8000 -W -u $USER_UID -m 1 -c dt:proxmark3 /usr/bin/bash Restart=always Type=simple RestartSec=1 @@ -47,7 +48,7 @@ WantedBy=multi-user.target [Service] User=dt WorkingDirectory=/home/dt -ExecStart=/usr/local/bin/ttyd -p 8080 -u dt -m 1 /usr/local/bin/pm3 +ExecStart=/usr/local/bin/ttyd -p 8080 -W -u $USER_UID -m 1 /usr/local/bin/pm3 Restart=always Type=simple RestartSec=1