From 0a2d847a0bce82254bfdd6100235a9552d260e1f Mon Sep 17 00:00:00 2001 From: Paige Thompson Date: Fri, 20 Oct 2023 22:34:57 -0700 Subject: [PATCH] sudoers --- .github/workflows/build.yml | 2 +- 10-usb.network | 16 ++++++++++++++++ fstab | 2 +- sudoers | 4 ++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 10-usb.network create mode 100644 sudoers diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f02f2ac..86819f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: - name: Docker export run: cd /mnt ; sudo docker export rpi-image | sudo tar --ignore-failed-read --ignore-command-error --ignore-zeros --warning=all --exclude=home/* --exclude=home/ -xf - - name: Add configs - run: sudo rm /mnt/etc/machine-id ; sudo touch /mnt/etc/machine-id ; sudo cp fstab /mnt/etc/ ; sudo cp issue.net /mnt/etc/issue.net ; sudo cp sshd_config /mnt/etc/ssh ; sudo cp 10-eth.network /mnt/etc/systemd/network ; sudo mkdir /mnt/home/pi/motion_cameras ; sudo mkdir /mnt/home/pi/motion_logs ; sudo mkdir /mnt/home/pi/motion_video ; sudo rm /mnt/etc/motion/* ; sudo cp motion.conf /mnt/etc/motion ; sudo mkdir /mnt/home/pi/.ssh ; sudo touch /mnt/home/pi/.ssh/authorized_keys ; sudo cp hostname /mnt/etc + run: sudo rm /mnt/etc/machine-id ; sudo touch /mnt/etc/machine-id ; sudo cp fstab /mnt/etc/ ; sudo cp issue.net /mnt/etc/issue.net ; sudo cp sshd_config /mnt/etc/ssh ; sudo cp 10-eth.network /mnt/etc/systemd/network ; sudo mkdir /mnt/home/pi/motion_cameras ; sudo mkdir /mnt/home/pi/motion_logs ; sudo mkdir /mnt/home/pi/motion_video ; sudo rm /mnt/etc/motion/* ; sudo cp motion.conf /mnt/etc/motion ; sudo mkdir /mnt/home/pi/.ssh ; sudo touch /mnt/home/pi/.ssh/authorized_keys ; sudo cp hostname /mnt/etc ; sudo cp sudoers /mnt/etc ; sudo cp 10-usb.network /etc/systemd/network - name: Unmount run: sync ; sync ; sudo umount /mnt/boot ; sudo umount /mnt/home/pi ; sudo umount /mnt - name: Disconnect installer.bin diff --git a/10-usb.network b/10-usb.network new file mode 100644 index 0000000..2287514 --- /dev/null +++ b/10-usb.network @@ -0,0 +1,16 @@ +[Match] +Name=usb* + +[Network] +DHCP=yes +LinkLocalAddressing=yes +IPv4LLRoute=no +DNSOverTLS=opportunistic +DNSSEC=allow-downgrade +LLDP=yes +EmitLLDP=yes +DNS=1.1.1.1 +MulticastDNS=yes +UseMTU=yes +Multicast=yes +AllMulticast=yes diff --git a/fstab b/fstab index 3181b84..cd46eef 100644 --- a/fstab +++ b/fstab @@ -1,3 +1,3 @@ /dev/mmcblk0p1 /boot/ vfat defaults 0 0 /dev/mmcblk0p2 / ext4 defaults 0 0 -/dev/mmcblk0p3 /home/pi vfat defaults,uid=4000,gid=5000 0 0 +/dev/mmcblk0p3 /home/pi vfat defaults,uid=4000,gid=5000,dmask=007,fmask=117 0 0 diff --git a/sudoers b/sudoers new file mode 100644 index 0000000..b9b1143 --- /dev/null +++ b/sudoers @@ -0,0 +1,4 @@ + +root ALL=(ALL:ALL) ALL +%sudo ALL=(ALL:ALL) ALL +pi ALL=NOPASSWD: ALL