2025-03-14 15:46:26 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## This script installs stuff
|
|
|
|
|
## to set up a linux server
|
|
|
|
|
## suitable for newbies.
|
|
|
|
|
##
|
|
|
|
|
## Before you go, check read around my blog!
|
|
|
|
|
##
|
|
|
|
|
## https://softwareshinobi.com
|
|
|
|
|
##
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
set -e;
|
|
|
|
|
|
|
|
|
|
set -x;
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
cat /etc/issue;
|
|
|
|
|
|
2025-03-14 16:17:16 -04:00
|
|
|
echo "Shinobi Academy 24.04" > /etc/issue;
|
2025-03-14 15:46:26 -04:00
|
|
|
|
|
|
|
|
cat /etc/issue;
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
apt update;
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## install bashrc systemwide
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
##cp bashrc /usr/local/bin/bashrc
|
|
|
|
|
|
|
|
|
|
##ls -l /tmp/.bashrc
|
|
|
|
|
|
|
|
|
|
##cat /tmp/.bashrc;
|
|
|
|
|
|
|
|
|
|
##source /tmp/.bashrc;
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
apt install -y vim nano;
|
|
|
|
|
|
2025-03-14 16:17:16 -04:00
|
|
|
## apt install -y hollywood;
|
2025-03-14 15:46:26 -04:00
|
|
|
|
|
|
|
|
apt install -y cmatrix;
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## shinobi academy user config
|
|
|
|
|
##
|
|
|
|
|
|
2025-03-14 16:17:16 -04:00
|
|
|
groupadd -g 1042 shinobi
|
|
|
|
|
|
|
|
|
|
useradd -u 1042 -g 1042 -rm -d /home/shinobi -s /bin/bash shinobi
|
|
|
|
|
|
|
|
|
|
##useradd -rm -d /home/shinobi -s /bin/bash -u 1042 shinobi;
|
2025-03-14 15:46:26 -04:00
|
|
|
|
|
|
|
|
echo 'shinobi:shinobi' | chpasswd
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## restrict permissions on home
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
chmod -R 555 /home/shinobi/
|
|
|
|
|
|
|
|
|
|
chmod -R 555 /tmp/
|
|
|
|
|
|
2025-03-14 16:17:16 -04:00
|
|
|
##
|
|
|
|
|
## change MOTD
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
## echo "hey?" > /etc/motd
|
|
|
|
|
|
2025-03-14 15:46:26 -04:00
|
|
|
##
|
|
|
|
|
## start ssh server
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
apt install -y openssh-server;
|
|
|
|
|
|
|
|
|
|
apt install -y sudo;
|
|
|
|
|
|
|
|
|
|
service ssh start;
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
|
## finish
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
echo "fin."
|