Updated for kali, ready for testing
This commit is contained in:
1 parent
83ee5a3678
commit
5ec6951eda
14 files changed
+104
-49
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
guest.tar.gz
|
||||||
|
guest.sqfs
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
# **H**ac**D**C **O**perating **S**ystem
|
# **H**ac**D**C **O**perating **S**ystem
|
||||||
|
|
||||||
|
Script to take a fresh Kali install to the base HacDC system environment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sh -c "$(curl -fsSL https://git.corrupt.link/liz/hdos/install.sh)"
|
||||||
|
```
|
||||||
|
|
||||||
[*More on the HacDC Wiki*](https://wiki.hacdc.org/en/Resources/HDOS)
|
[*More on the HacDC Wiki*](https://wiki.hacdc.org/en/Resources/HDOS)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
//10.11.3.44/Anna /mnt/gibson cifs uid=1000,gid=1900,credentials=/etc/gibson,iocharset=utf8 0 0
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
user=laptop
|
||||||
|
password=
|
||||||
|
domain=WORKGROUP
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Restore Guest Home Directory
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/sbin/restore-home
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -1,10 +1,3 @@
|
|||||||
# OhMyZSH
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
|
||||||
ZSH_THEME="bira"
|
|
||||||
COMPLETION_WAITING_DOTS="true"
|
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
plugins=(git)
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
# NVM
|
# NVM
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[Greeter]
|
|
||||||
background=/etc/lightdm/htown.png
|
|
||||||
background-color=#000000
|
|
||||||
show-hostname=true
|
|
||||||
show-power=true
|
|
||||||
show-a11y=true
|
|
||||||
show-clock=true
|
|
||||||
#logo=
|
|
||||||
group-filter=
|
|
||||||
[SeatDefaults]
|
|
||||||
session-setup-script=/opt/hdos/scripts/restore-home
|
|
||||||
@@ -98,6 +98,7 @@ previsat
|
|||||||
python3-all
|
python3-all
|
||||||
quisk
|
quisk
|
||||||
rclone
|
rclone
|
||||||
|
squashfs-tools
|
||||||
rtl-sdr
|
rtl-sdr
|
||||||
screen
|
screen
|
||||||
sed
|
sed
|
||||||
@@ -119,6 +120,7 @@ tmux
|
|||||||
tty-solitaire
|
tty-solitaire
|
||||||
tvtime
|
tvtime
|
||||||
udav
|
udav
|
||||||
|
cifs-utils
|
||||||
vlc
|
vlc
|
||||||
vlc-plugin-access-extra
|
vlc-plugin-access-extra
|
||||||
welle.io
|
welle.io
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
com.getpostman.Postman
|
||||||
|
com.google.EarthPro
|
||||||
|
com.js8call.JS8Call
|
||||||
|
com.prusa3d.PrusaSlicer
|
||||||
|
com.rawtherapee.RawTherapee
|
||||||
|
io.github.ungoogled_software.ungoogled_chromium
|
||||||
|
io.gitlab.librewolf-community
|
||||||
|
org.blender.Blender
|
||||||
|
org.darktable.Darktable
|
||||||
|
org.freecad.FreeCAD
|
||||||
|
org.qgis.qgis
|
||||||
|
org.videolan.VLC
|
||||||
|
com.vscodium.codium-insiders
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
deb http://mirror.cogentco.com/debian/ bookworm main non-free contrib non-free-firmware
|
|
||||||
deb-src http://mirror.cogentco.com/debian/ bookworm main non-free contrib non-free-firmware
|
|
||||||
|
|
||||||
deb http://security.debian.org/debian-security bookworm-security main non-free contrib non-free-firmware
|
|
||||||
deb-src http://security.debian.org/debian-security bookworm-security main non-free contrib non-free-firmware
|
|
||||||
|
|
||||||
deb http://mirror.cogentco.com/debian/ bookworm-updates main non-free contrib non-free-firmware
|
|
||||||
deb-src http://mirror.cogentco.com/debian/ bookworm-updates main non-free contrib non-free-firmware
|
|
||||||
+63
-17
@@ -1,35 +1,81 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Todo:
|
||||||
|
# - Add error handling for each step
|
||||||
|
read -p "Gibson Share Password: " GIBSON_PASS
|
||||||
|
|
||||||
HDOS_ROOT=/opt/hdos
|
HDOS_ROOT=/opt/hdos
|
||||||
|
|
||||||
|
if [ -d ${HDOS_ROOT} ]; then
|
||||||
rm -rf ${HDOS_ROOT}
|
rm -rf ${HDOS_ROOT}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod +x ${HDOS_ROOT}/scripts/*
|
||||||
apt install git sudo curl wget zsh -yqq
|
apt install git sudo curl wget zsh -yqq
|
||||||
|
|
||||||
git clone https://git.corrupt.link/liz/hdos.git ${HDOS_ROOT}
|
git clone https://git.corrupt.link/liz/hdos.git ${HDOS_ROOT}
|
||||||
chmod -R 755 ${HDOS_ROOT}
|
chmod -R 755 ${HDOS_ROOT}
|
||||||
|
|
||||||
cp ${HDOS_ROOT}/lists/sources.list /etc/apt/sources.list
|
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
|
|
||||||
apt upgrade -yqq
|
apt full-upgrade -yqq
|
||||||
|
|
||||||
xargs apt install -y < ${HDOS_ROOT}/lists/apt-packages
|
INSTALLED=`dpkg --get-selections | grep -e " install$" | sed -e 's/\t\+install//'`
|
||||||
|
while read PACKAGE; do
|
||||||
|
if ! echo "$INSTALLED" | grep -q "^$PACKAGE$"; then
|
||||||
|
apt install -yqq "$PACKAGE"
|
||||||
|
fi
|
||||||
|
done < ${HDOS_ROOT}/lists/apt-packages
|
||||||
|
|
||||||
apt autoremove -y
|
apt autoremove -y
|
||||||
|
|
||||||
${HDOS_ROOT}/scripts/nvm
|
cat ${HDOS_ROOT}/dotfiles/rc_addition >> /home/hacdc/.zshrc
|
||||||
${HDOS_ROOT}/scripts/codium
|
groupadd --gid 1900 classroom
|
||||||
${HDOS_ROOT}/scripts/ohmyzsh
|
usermod -aG classroom hacdc
|
||||||
|
useradd -m -s /usr/bin/zsh -G dialout,cdrom,floppy,audio,video,wireshark,classroom guest
|
||||||
|
cp /home/hacdc/.zshrc /home/guest/.zshrc
|
||||||
|
chown guest:guest /home/guest/.zshrc
|
||||||
|
|
||||||
chsh root /usr/bin/zsh
|
|
||||||
chsh hacdc /usr/bin/zsh
|
|
||||||
|
|
||||||
sudo -u hacdc ${HDOS_ROOT}/scripts/ohmyzsh
|
|
||||||
sudo -u hacdc ${HDOS_ROOT}/scripts/nvm
|
sudo -u hacdc ${HDOS_ROOT}/scripts/nvm
|
||||||
sudo -u hacdc ${HDOS_ROOT}/scripts/pyenv
|
sudo -u hacdc ${HDOS_ROOT}/scripts/pyenv
|
||||||
sudo -u hacdc gpg --list-keys
|
|
||||||
cp ${HDOS_ROOT}/dotfiles/zshrc /root/.zshrc
|
|
||||||
cp ${HDOS_ROOT}/dotfiles/zshrc /home/hacdc/.zshrc
|
|
||||||
chown hacdc:hacdc /home/hacdc/.zshrc
|
|
||||||
|
|
||||||
cp ${HDOS_ROOT}/dotfiles/slick-greeter.conf /etc/lightdm/
|
sudo -u guest ${HDOS_ROOT}/scripts/nvm
|
||||||
cp ${HDOS_ROOT}/dotfiles/htown.png /etc/lightdm/
|
sudo -u guest ${HDOS_ROOT}/scripts/pyenv
|
||||||
|
|
||||||
|
# Generate GPG framework
|
||||||
|
sudo -u hacdc gpg --list-keys
|
||||||
|
sudo -u guest gpg --list-keys
|
||||||
|
|
||||||
|
# Setup Shared Directory
|
||||||
|
SHARED_DIR=/mnt/gibson
|
||||||
|
if [ ! -d ${SHARED_DIR} ]; then
|
||||||
|
mkdir -p ${SHARED_DIR}
|
||||||
|
cat ${HDOS_ROOT}/dotfiles/gibson > /etc/gibson
|
||||||
|
chmod 600 /etc/gibson
|
||||||
|
cat ${HDOS_ROOT}/dotfiles/fstab >> /etc/fstab
|
||||||
|
chmod 766 ${SHARED_DIR}
|
||||||
|
sed -i "s/password=/password=${GIBSON_PASS}/" /etc/gibson
|
||||||
|
systemctl daemon-reload
|
||||||
|
ln -s ${SHARED_DIR} /home/hacdc/Desktop/gibson
|
||||||
|
ln -s ${SHARED_DIR} /home/guest/Desktop/gibson
|
||||||
|
chown guest:guest /home/guest/Desktop/gibson
|
||||||
|
chown hacdc:hacdc /home/hacdc/Desktop/gibson
|
||||||
|
chmod 755 ${SHARED_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set login wallpaper
|
||||||
|
cp ${HDOS_ROOT}/dotfiles/htown.png /usr/share/backgrounds/htown.png
|
||||||
|
sed -i 's/^background=.*$/background=\/usr\/share\/backgrounds\/htown.png/' /usr/share/sddm/themes/*/theme.conf.user
|
||||||
|
|
||||||
|
mksquashfs /home/guest ${HDOS_ROOT}/guest.sqfs --noappend
|
||||||
|
cp ${HDOS_ROOT}/scripts/restore-home /usr/sbin/restore-home
|
||||||
|
cp ${HDOS_ROOT}/dotfiles/guest-restore.service /etc/systemd/system/guest-restore.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable guest-restore.service
|
||||||
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
rm -rf /home/hacdc
|
#!/bin/bash
|
||||||
tar -xf /opt/home.tar -C /
|
|
||||||
chown -R hacdc:hacdc /home/hacdc
|
rm -rf /home/guest
|
||||||
chown -R hacdc:hacdc /home/hacdc/.*
|
unsquashfs -d /home/guest /opt/hdos/guest.sqfs
|
||||||
|
chown -R guest:guest /home/guest
|
||||||
@@ -1 +0,0 @@
|
|||||||
tar -cvpzf /opt/home.tgz /home/hacdc
|
|
||||||
Reference in new issue
Block a user