From ba50dab882a4b58d4772543da435100756e0945d Mon Sep 17 00:00:00 2001 From: aetonsi <18366087+aetonsi@users.noreply.github.com> Date: Thu, 28 Dec 2023 19:13:59 +0100 Subject: [PATCH] add rpi setup --- sysadmin/README.md | 1 + sysadmin/rpi-setup.md | 75 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 sysadmin/rpi-setup.md diff --git a/sysadmin/README.md b/sysadmin/README.md index 32d502c..59e4319 100644 --- a/sysadmin/README.md +++ b/sysadmin/README.md @@ -2,6 +2,7 @@ SysAdmin notions, tools and procedures. +- [Raspberry PI Setup](rpi-setup.md) - [OpenSSH for Windows](win-openssh.md) - [Microsoft SQL Server](ms-sqlserver.md) - [Starting applications on Windows](win-start.md) diff --git a/sysadmin/rpi-setup.md b/sysadmin/rpi-setup.md new file mode 100644 index 0000000..0e9b21d --- /dev/null +++ b/sysadmin/rpi-setup.md @@ -0,0 +1,75 @@ +# Raspberry PI Setup + +## Sources + +- +- +- +- + +### 1. Update things + +```shell +sudo apt update +sudo apt upgrade +``` + +### 2. Setup SSH banner + +```shell +echo "Hello world! Successfully logged into RPI" | sudo tee -a /etc/sshbanner +echo "Banner=/etc/sshbanner" | sudo tee -a /etc/ssh/sshd_config +sudo systemctl restart sshd +``` + +### 3. `raspi-config` + +```shell +sudo raspi-config +``` + +### 4. Config NetBIOS name + +... by installing Samba + avahi-daemon. + +```shell +sudo apt install samba samba-common-bin +sudo smbpasswd -a pi +read -r -d '' smbcfg << hd +[shared] + comment= Shared Folder + path = /usr/shared + browseable = Yes + writeable = Yes + only guest = no + create mask = 0777 + directory mask = 0777 + public = no + force user = pi +hd +echo "$smbcfg" | sudo tee -a /etc/samba/smb.conf + +sudo apt-get install avahi-daemon +sudo systemctl enable avahi-daemon +sudo /etc/init.d/avahi-daemon restart +``` + +### 5. Setup RDP + +```shell +sudo apt install xrdp +sudo deluser pi render # necessary or else you get a black screen on some RPI-Os versions +``` + +### 6. (optional) Setup [TinyPilot](https://github.com/tiny-pilot/tinypilot) + +Follow [instructions here](https://github.com/tiny-pilot/tinypilot?tab=readme-ov-file#simple-installation) for up-to-date commands. + +```shell +curl \ + --silent \ + --show-error \ + https://raw.githubusercontent.com/tiny-pilot/tinypilot/master/get-tinypilot.sh | \ + bash - && \ + sudo reboot +```