← Teacher guides

Teacher guide: System admin on a Raspberry Pi

For Years 9–10: run a small server the way administrators do. Log in over the network, install software, add accounts and groups, start and keep services running, share files and host a media server, and keep it all backed up and behind a firewall. Everything runs on a pretend Raspberry Pi in the browser; a real Pi is the real thing, and the lessons say how.

Open the student course · How the ideas build

Each lesson works two ways. Students can work through the online tutorial at their own pace (it checks their answers and saves their progress in their browser), or you can teach it to the whole class from the slides, then send students into the tutorial for the Modify and Make steps.

Every lesson guide has plain-language notes, the answers to every check, a solution for every task, and slides and a worksheet for Waypoints Prepare. These guide pages are not linked from student pages, but they are not secret either: keep printed Teacher editions for answers you do not want students to find.

Whole-course cheat sheet: Open to print (every command, grouped by unit: a handout for the final challenge)

Set up

Log in to the Pi over the network and install software.

Setting up a Pi in 5 minutes (read before teaching this unit)

The idea in plain words

A server is a computer you run from somewhere else. A Raspberry Pi needs no screen: you reach it over the network by name (raspberrypi.local) or address (192.168.1.23) and type to it with ssh. After you log in, every command runs on the Pi until you type exit.

New software comes from a software source with apt. Run sudo apt update first to download the list, then sudo apt install name. sudo runs one command as the administrator; the system records who used it. Without the internet, apt update fails, so plan ahead with a local source or a USB stick.

Where to run it for real

The board is a pretend Pi, the same for everyone. For the real thing you need a Pi 4 or Pi 5 (a Pi 5 wants a 27 W supply), a microSD card and a power supply. Students can use a screen and keyboard, or ssh from a laptop. Flash with Raspberry Pi Imager (Raspberry Pi OS Lite 64-bit; set a hostname, a user and password, and ssh on), or clone a ready-made image you prepared. Either gets every student to the same starting point.

What students get wrong

  • Commands run where I type. After ssh they run on the Pi; before it, on the laptop.
  • apt knows everything. It only knows its list; update first.
  • Root all the time is easier. And much riskier: one typo can break anything, and the log only says root.

The words

server, ssh, hostname, IP address, apt, package, sudo, administrator.

Cheat sheet: Open to print (A4, with board pictures) · Open in Print · Markdown

People

Accounts, groups and sudo: who may do what.

Accounts, groups and sudo in 5 minutes (read before teaching this unit)

The idea in plain words

Every person gets an account and a private home folder. A group gives several accounts the same rights. Only members of the sudo group may use sudo, and /var/log/auth.log records every login and every sudo.

sudo adduser alex makes an account. sudo usermod -aG class alex adds Alex to the group class (the a keeps Alex's other groups; without it they are replaced). id alex lists them. This is authentication (who are you?) and authorisation (what may you do?) on a real system.

Where to run it for real

On a real Pi, give each student their own account and never share the pi password: the log then says who did what, and one person can be removed without changing anyone else's.

What students get wrong

  • -G adds a group. It replaces them; use -aG.
  • Everyone logged in can open everything. Home folders are private by default.
  • Sharing one password is fine. The log can't tell people apart.

The words

account, home folder, group, sudo group, authentication, authorisation, log.

Cheat sheet: Open to print (A4, with board pictures) · Open in Print · Markdown

Serve

Services, file sharing with Samba and a Jellyfin media server.

Services, sharing and media in 5 minutes (read before teaching this unit)

The idea in plain words

A service is a program the operating system keeps running in the background. sudo systemctl start name runs it now; sudo systemctl enable name runs it at every boot. They are separate switches. systemctl status name shows both; journalctl -u name shows its log.

A service reads its config file when it starts, so after a change you restart it. A service runs as a user with only that user's rights, so it can only read files that user may read. A port is a numbered door on the computer (22 ssh, 445 Samba, 8096 Jellyfin), and a firewall (ufw) blocks every port you do not allow.

Samba shares a folder with Windows, Mac and Linux. Jellyfin serves films and music to other devices. Other options exist (NFS and Nextcloud for files; Plex, Emby and Kodi for media), and the lessons name them.

Where to run it for real

Samba needs a password for each user (sudo smbpasswd -a alex) and a few more lines in its config than the board needs. Raspberry Pi OS does not include Jellyfin: add Jellyfin's own repository first (its website gives the commands).

What students get wrong

  • Enable starts it. It only sets the boot setting.
  • A service watches its config. It reads it at start; restart it.
  • 777 fixes permissions. It opens everything; fix the group and mode instead.
  • A server can read my home folder. It is another user.

The words

service, start, enable, config file, port, firewall, share, group permission.

Cheat sheet: Open to print (A4, with board pictures) · Open in Print · Markdown

Keep it running

Backups, schedules and watching the disk.

Keeping it running in 5 minutes (read before teaching this unit)

The idea in plain words

Three habits keep a server alive. A backup on a different disk (tar -czf backup.tar.gz folder; list it with tar -tzf, restore with tar -xzf). A schedule so it happens without you: cron lines have five fields, minute, hour, day of month, month, weekday, so 30 2 * * * is 02:30 every day, and */15 * * * * is every 15 minutes. And a test: a backup you have never restored is only a hope.

df -h shows how full each disk is; du -h folder shows what a folder takes.

Where to run it for real

On a real Pi crontab -e opens an editor (nano). The board takes echo "line" | crontab - instead, which replaces the whole schedule. Use a USB drive for the backup: a copy on the same SD card dies with it.

What students get wrong

  • 15 in the first field is every 15 minutes. It is minute 15 of each hour.
  • A backup that ran is a backup that works. Only a restore proves it.
  • Copy it to the same card. The point is a different disk.

The words

backup, archive, cron, schedule, restore, disk space.

Cheat sheet: Open to print (A4, with board pictures) · Open in Print · Markdown

The class server

Put every layer together, then explain what each protects.

Cheat sheet: Open to print (A4, with board pictures) · Open in Print · Markdown

Project briefs

Printable task sheets for assessment or extension: students make something, hand it in and explain their choices. The success criteria are the curriculum nodes' own. Open the briefs page

The class server report (after class-server)

You have set up a server for your class. Now write the admin log and report an administrator would hand to a school.

The log shows what you did and why, in order. The report explains how the parts work together to keep the server safe, and where it is still weak.

Hand in:

  • Your admin log: each command you ran in the class server, with a line on what it did and why.
  • A table of the layers (accounts and groups, permissions, firewall, backup), with what each one protects against and one thing it does not protect against.
  • A short explanation of the difference between proving who someone is (a sign-in) and what they may do once in (permissions), using one example from your server.
  • Your answer to one question: should this server be reachable from the internet? Give two reasons, and what you would do instead.

Evidences:

  • Access control mechanisms (AC9TDI10K01 node 3): Distinguishes authentication from authorisation/permissions correctly; Explains what a specific access control mechanism protects against in a networked context
  • Integration — how hardware and software work together in secured networks (AC9TDI10K01 node 5): Identifies the role of at least two distinct components in securing data in a networked system; Explains how the components interact — not just what each does individually

Strong reports treat each part as a layer with its own job: a firewall cannot stop a stolen password, permissions cannot stop a failed disk, and a backup cannot stop a leak. Check that the 'does not protect against' column is honest, not empty. For the sign-in versus permissions line, look for a concrete example (Alex can log in but cannot write to a folder owned by another group). For the internet question the best answers mention that an open port is scanned within minutes and that a VPN keeps the server on a private network. The two nodes are chosen because the hand-ins evidence them: node 3 (authentication and authorisation, and what a mechanism protects against) and node 5 (at least two components securing a networked system and how they interact).