diff options
| author | Alexander Hill <ahill@breadpudding.dev> | 2025-07-26 17:31:43 -0400 |
|---|---|---|
| committer | Alexander Hill <ahill@breadpudding.dev> | 2025-07-26 17:31:43 -0400 |
| commit | 0b06461ff5fad4c8c26856bfded8ea76029cd779 (patch) | |
| tree | 493a38b8f9e5e2798c5932140cb8b6463dbff619 | |
| parent | c12534c92b2e2fd64ca730e33079f432e3463921 (diff) | |
Added Dropbear for troubleshooting purposes
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | build-chroot.sh | 38 | ||||
| -rw-r--r-- | configure-image.sh | 5 | ||||
| -rw-r--r-- | sources.list | 1 |
4 files changed, 42 insertions, 4 deletions
@@ -78,7 +78,7 @@ Once again, you can change the fstab by opening `maple/etc/fstab` in your favori /dev/vda1 /boot vfat defaults 0 2 proc /proc proc nosuid,noexec,nodev 0 0 sysfs /sys sysfs nosuid,noexec,nodev 0 0 -devpts /dev/pts devpts gid=5,mode=620 0 0 +devpts /dev/pts devpts defaults 0 0 tmpfs /run tmpfs defaults 0 0 devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 tmpfs /dev/shm tmpfs nosuid,nodev 0 0 diff --git a/build-chroot.sh b/build-chroot.sh index 3903fb5..091b5d8 100755 --- a/build-chroot.sh +++ b/build-chroot.sh @@ -311,6 +311,11 @@ echo "auth required pam_unix.so nullok" >> /etc/pam.d/system-auth echo "account required pam_unix.so" >> /etc/pam.d/system-auth echo "password required pam_unix.so nullok shadow" >> /etc/pam.d/system-auth echo "session required pam_unix.so" >> /etc/pam.d/system-auth +echo "#%PAM-1.0" > /etc/pam.d/sshd +echo "auth include system-auth" >> /etc/pam.d/sshd +echo "account include system-auth" >> /etc/pam.d/sshd +echo "password include system-auth" >> /etc/pam.d/sshd +echo "session include system-auth" >> /etc/pam.d/sshd cd .. # OpenRC Build @@ -1524,9 +1529,37 @@ make -j $THREADS make -j $THREADS install cd .. +# Dropbear Build +tar xf ../sources/dropbear-*.tar* +cd dropbear-*/ +./configure \ + --enable-pam \ + --exec-prefix="" \ + --libexecdir=/lib \ + --localstatedir=/var \ + --prefix=/usr \ + --sysconfdir=/etc +make -j $THREADS +make -j $THREADS install +# NOTE: Creating an ssh alias here for convenience's sake. ~ahill +ln -s dbclient /bin/ssh +# NOTE: Dropbear doesn't come with OpenRC support, but that's simple enough to +# fix. ~ahill +echo "#!/bin/openrc-run" > /etc/init.d/dropbear +echo "command=\"/bin/dropbear\"" >> /etc/init.d/dropbear +echo "command_args=\"-R\"" >> /etc/init.d/dropbear +echo "pidfile=\"/run/dropbear.pid\"" >> /etc/init.d/dropbear +chmod +x /etc/init.d/dropbear +# NOTE: Dropbear won't make keys if the directory doesn't exist. ~ahill +mkdir -p /etc/dropbear +cd .. + # Basic Configuration -echo "root::0:0::/:/bin/zsh" > /etc/passwd +echo "root:x:0:0::/:/bin/zsh" > /etc/passwd echo "root:x:0:root" > /etc/group +echo "root::20295::::::" > /etc/shadow +echo "/bin/sh" > /etc/shells +echo "/bin/zsh" >> /etc/shells echo "maple" > /etc/hostname echo "NAME=Maple Linux" > /etc/os-release echo "VERSION=2025" >> /etc/os-release @@ -1541,6 +1574,9 @@ cp /usr/share/limine/BOOTX64.EFI /boot/EFI/BOOT/ ln -s agetty /etc/init.d/agetty.tty1 cp /etc/conf.d/agetty /etc/conf.d/agetty.tty1 rc-update add agetty.tty1 default +# NOTE: Dropbear currently included for troubleshooting purposes. Should be +# disabled for desktop systems. ~ahill +rc-update add dropbear default rc-update add mdevd sysinit cd .. diff --git a/configure-image.sh b/configure-image.sh index de88a21..7d89dbb 100644 --- a/configure-image.sh +++ b/configure-image.sh @@ -2,13 +2,14 @@ # fstab Generation # TODO: Is the dump column still used today? ~ahill +# NOTE: /dev is not here because CONFIG_DEVTMPFS_MOUNT is enabled in the Linux +# kernel configuration. ~ahill echo "/dev/vda2 / xfs defaults 1 1" > /etc/fstab echo "/dev/vda1 /boot vfat defaults 0 2" >> /etc/fstab echo "proc /proc proc nosuid,noexec,nodev 0 0" >> /etc/fstab echo "sysfs /sys sysfs nosuid,noexec,nodev 0 0" >> /etc/fstab -echo "devpts /dev/pts devpts gid=5,mode=620 0 0" >> /etc/fstab +echo "devpts /dev/pts devpts defaults 0 0" >> /etc/fstab echo "tmpfs /run tmpfs defaults 0 0" >> /etc/fstab -echo "devtmpfs /dev devtmpfs mode=0755,nosuid 0 0" >> /etc/fstab echo "tmpfs /dev/shm tmpfs nosuid,nodev 0 0" >> /etc/fstab echo "cgroup2 /sys/fs/cgroup cgroup2 nosuid,noexec,nodev 0 0" >> /etc/fstab diff --git a/sources.list b/sources.list index 74c5236..2280099 100644 --- a/sources.list +++ b/sources.list @@ -15,6 +15,7 @@ f4619a1e2474c4bbfedc88a7c2191209c8334b48fa1f4e53fd584cc12e9120dd,https://curl.se 6721e606609226dbf4d864a78802a9e96beec0ee034a1bd84138b3e037bba7d9,https://github.com/NetworkConfiguration/dhcpcd/releases/download/v10.2.4/dhcpcd-10.2.4.tar.xz, 7c8b7f9fc8609141fdea9cece85249d308624391ff61dedaf528fcb337727dfd,https://ftpmirror.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz, 64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527,https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz, +93ebe1294ee3203d3bf548c78d51bde9494d3f24de64eaec380a2620f0431f20,https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2025.88.tar.gz,dropbear-2025.88.tar.gz 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30,https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz, 1387e0b67ff247d2abde998f90dfbf70c1491391a59ddfecb8ae698789f0a4f5,https://ftpmirror.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz, e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995,https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz, |
