Final Lab Exercise of Linux Basics dat8tf063-27 Spring 2016

Build and test systems for the imaginary company. You have just the empty computer in front of you (no operating system yet) and a Linux Live USB. Feel free to browse the public Internet.
No luck needed, just show us your skills. This is the final lab exercise of Linux Basics 27.

EuroRobo Ltd

Welcome to EuroRobot Ltd, a European robotics learning company.
Our company has 7 employees: Jorma Mähkylä, Pekka Hurme, Ronaldo Smith, Håkan Petersson, Jim Jones, Einari Vähäkäähkä, Eija Väntäri.


Install terowatch. (In this specific task, you can assume that it’s safe to install pacakges from Tero’s repository)

sudo dpkg -i terorep_0.0.3_all.deb
sudo apt-get update
sudo apt-get -y install terowatch

After the installation, command ‘terowatch’ must print the text “Terowatch is installed.”

Requirements of the Company

Install a workstation for us. Use your own name for the first user, and the number on monitor foot for the computer name.
We want to browse the web and write documents with LibreOffice.
Create sample homepages for everyone. Serve these pages on web server on this machine.
Pekka programs in Python, so put a hello world in a file “” in his home directory.
Make the program runnable by all users, so that in runs when any user types ‘’ on any directory.
We want to access our computers remotely. Prepare to manage the computer from abroad.
Automate logging in with SSH public key. Demonstrate this with your own user.
Put a list of passwords in a text file “services.txt” on your own home directory. Protect it with ‘chmod og-rwx services.txt’.
List all the services and sample programs in this document (with their paths or URLs).
Bonus tasks:
Håkan programs in PHP, create him a hello world web page with that “http://localhost/~USERNAME/hello.php”. Use his real username instead of USERNAME.
Jorma programs in Java, create him a “Hello world” with Java in his home directory “”.

Rules briefly

Forbidden: Two-way communication, any items not specifically allowed, speaking without permission, looking others monitors.
Forbidden: Paper notes, mobile phones, logging in to anything else but the local computer.
Allowed: Browsing public web, using search engines.

The End

  1. Put your name and student number is on the documents
  2. Write a list of what works and what does not work into services.txt. (No need to report how they were installed).
  3. Put all required documents and tests open on your screen (this is how I evaluate it). Put the file with all passwords (including the one with sudo) on screen.
  4. Take a screenshot (PrintScrn) and save it to default location in your home directory “/home/*/Pictures/Screenshort*.png”
  5. Verify that your screen is unlocked and your saver will not lock the screen
  6. Give me feedback 1) Numeric feedback to e-lomake 2) Free text feedback as a comment: Did you learn something? Was it usefull? How are you going to use skills after course? Which class was the most interesting? How could I improve the course? Would you recommend this course to a friend or a collegue? Anything else on your mind?
  7. Put a big window (like browser) that covers other windows.

Thank you! Remember to play with Linux at home.

Posted in Uncategorized | Tagged , , , , , | 6 Comments

6 Responses to Final Lab Exercise of Linux Basics dat8tf063-27 Spring 2016

  1. Dennis Dang says:

    I was new to Linux before this course. Afterward I have learned most of the basic which seem satisfying to me. Everything seem useful and i have to admit that this was probably the most useful course i have taken in this school. For now i will try to tweak and play more with Xubuntu at home.
    Yes i will recommend the course to a friend.

  2. Fernanda says:

    This course was very interesting and eye opening to a different way of doing things. Its incredible how simple yet complex and powerful Linux can be. Thanks so much for your patience and amazing lessons.

  3. Rabindra Shrestha says:

    Thank you for the course, It was really effective and I learnt a lot. I had zero knowledge about linux and command lines and now I have learnt a lot.

  4. Marie Monkam says:

    This has been a good journey. An ultimate good one for a Linux beginner. The course covered most of the basics and was well implemented. It would good to have it more organized. It is not easy to find the assignments on the page. I would recommend it to anyone else interested in learning new things. Special thanks to teacher as well.

  5. The task says don’t let screen lock, so please don’t lock the workstation. I spent a very busy hour with Gearoid, breaking into the computers. Luckily, “boot access is root access”. As the disks were not encrypted and we could physically get to the machines, we could open them.
    Always use good, unique passwords. You probably know this already, but here are the guidelines. More than 8 characters, uppercase, lowercase, numbers, special characters. No scandics “åäö”. Don’t use sequential passwords (wrong: djidk01a, djidk02b…). If there are a lot of passwords, you can randomize them locally. Obviously, you can’t randomize them on any scam web page. You can randomize passwords locally with pwgen, gpw, makepasswd – or just your creativity. ‘pwgen –symbols 12 1’. Eight characters is the minimum length if your password is has high entropy (is random enough), so six chars is too short.
    Use mirrors as needed. Is apt-get slow in the lab, but fast at home? All lab computers are behind a single IP number behind NAT. If all those computers try to download from the same repository at the same time, all computers get throttled. So, use a non default mirror (not fi, not us). ‘sudo software-properties-gtk’, Change the mirror in “Download from” to something non-default but still nearby (in Europe or US). Then ‘sudo apt-get update’. Some of you did this and got very fast downloads.
    Use plain text if asked. I always use plain text if there is no reason to use something complicated. Plain text editors include nano, gedit, vim, emacs, mousepad, geany. Word processors, such as LibreOffice, Microsoft Office or OpenOffice are not plain text editors. In this exam, services.txt should be plain text.
    Don’t go sudoing in other users home directories. The files end up being owned by root. What good is a sample homepage you can’t edit? Instead, use ssh to log in as that user ‘ssh liisa@localhost’ when you set up user specific things. You can go to user home dir before you give the password to use – this way you can be sure you won’t mistakenly see private files of the user. If you mistakenly used sudo when creating files in home directories, you can fix the file ownership with ‘sudo chown tero.tero /home/tero/’.
    Class names are capitalized (i.e. first letter capitalized) in most programming languages. For example, FoobarClass but foobarFunction. In Java, each file contains single class. The file name must be exactly the class name and the suffix .java. For example, You can install Java developer tools with ‘sudo apt-get -y install openjdk-7-jdk’.
    Be real. If your services.txt lists user home pages as working, but access.log is full of just 403, it really does not make you look good.
    User home pages can be enabled easily, and they have worked the same way for ages. . User home pages only make sense if users can edit them. It does not make sense to create home pages as root, because users can not edit them then. Easiest way is to log to each user with ssh (before you give users their passwords). An advanced way is to create the sample homepages to /etc/skel/ before creating users with adduser.
    To be continued…

  6. SSH login can be automated with public keys. Use ssh-key-gen and ssh-copy-id.
    When web pages are served by Apache or another daemon, the URL starts with “http://” or “https://”. They are just opened locally (without server), if the URL starts with “file:///”.