automated terminal push
This commit is contained in:
82
servers/academy/provision/provision.bash
Executable file
82
servers/academy/provision/provision.bash
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/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;
|
||||
|
||||
##echo "Shinobi Academy Linux 10x" > /etc/issue;
|
||||
|
||||
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;
|
||||
|
||||
apt install -y hollywood;
|
||||
|
||||
apt install -y cmatrix;
|
||||
|
||||
##
|
||||
## shinobi academy user config
|
||||
##
|
||||
|
||||
useradd -rm -d /home/shinobi -s /bin/bash -u 1042 shinobi;
|
||||
|
||||
echo 'shinobi:shinobi' | chpasswd
|
||||
|
||||
##
|
||||
## restrict permissions on home
|
||||
##
|
||||
|
||||
chown -R nobody: /home/shinobi/
|
||||
|
||||
chmod -R 555 /home/shinobi/
|
||||
|
||||
chmod -R 555 /tmp/
|
||||
|
||||
##
|
||||
## start ssh server
|
||||
##
|
||||
|
||||
apt install -y openssh-server;
|
||||
|
||||
apt install -y sudo;
|
||||
|
||||
service ssh start;
|
||||
|
||||
##
|
||||
## finish
|
||||
##
|
||||
|
||||
echo "fin."
|
||||
Reference in New Issue
Block a user