Skip to content
Snippets Groups Projects
Unverified Commit b7fa0265 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

add server_init.sh script for the ifb

parent 41521100
No related branches found
No related tags found
No related merge requests found
# UNIX training course
[![cc_by_sa](http://gitbio.ens-lyon.fr/LBMC/hub/formations/unix/-/blob/master/img/cc_by_sa.png)](http://creativecommons.org/licenses/by-sa/4.0/)
[![cc_by_sa](./img/cc_by_sa.png)](http://creativecommons.org/licenses/by-sa/4.0/)
## Understanding a computer
......
sudo apt update
sudo apt install --yes openssl shellinabox
sudo sed -i 's|SHELLINABOX_PORT=4200|SHELLINABOX_PORT=443|' /etc/default/shellinabox
sudo iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT
sudo iptables-save
sudo systemctl restart shellinabox
sudo useradd -m -s /bin/bash -g users -G adm,dialout,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev etudiant
sudo cp /etc/skel/.* /home/etudiant/
USER_PASSWORD=$( openssl rand -hex 12 )
sudo passwd etudiant << EOF
${USER_PASSWORD}
${USER_PASSWORD}
EOF
HTTP_ENDP="https://$HOST_NAME"
ss-set url.service "${HTTP_ENDP}"
ss-set ss:url.service "[HTTPS]$HTTP_ENDP,[LOGIN]$etudiant,[PASSWORD]$USER_PASSWORD"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment