Lab 2 - Permissions and Software Management
Expectations
Labs in this class are built to encourage creativity and problem-solving abilities. Thus, the instructions provided in these labs will generally not be comprehensive. This is to better mimic the real world, where documentation on how to complete a desired task may be sparse or even nonexistent. Students are encouraged to use external resources to complete these labs. However, do not hesitate to ask me for help. I will always be willing to provide more information as needed.
Objectives
- Install a GUI of your choice onto your Ubuntu server
- Install and configure xrdp on your Ubuntu Server
- Enable remote desktop into your Ubuntu server (Just like you did for SSH)
- Install syslog-ng onto your Ubuntu
- Configure OPNSense to send syslogs to your syslog server on Ubuntu
- Become familiar with how file permissions work on Unix/Linux
Stage 1 - Installing a GUI on Ubuntu
You may install a GUI of your choice on Ubuntu. However, I have linked a guide below which provides instructions on how to install the default Ubuntu desktop environment.
Visit this link here: https://phoenixnap.com/kb/how-to-install-a-gui-on-ubuntu
There are numerous possible desktop environments to choose from, each with their own pros and cons. Do a little research to see which one you prefer. Alternatively, just go ahead with the defaults.
Stage 2 - Installing and exposing xrdp
Installing xrdp on Ubuntu is a relatively straightforward process, with a multitude of guides online available to you. Try and find one you like and work through it, solving any problems you encounter along the way. You will need to find the port that xrdp uses, then port forward it in OPNsense to enable remote desktop from outside your "LAN", just like you did for SSH in lab 1.
You may notice that upon attempting to RDP into your Ubuntu machine remotely, it connects but fails to start a remote desktop session. This is likely because you're still logged in as the same user already. Try logging into your Ubuntu server via Proxmox, and "logout" from your desktop session, then try again.
Stage 3 - Installing syslog-ng
The provided GitHub repository contains instructions on how to install syslog-ng. You will need to install this software on Ubuntu, then configure OPNsense to send its system logs to the syslog server you just installed. Use resources available to you to determine how the complete this task.
GitHub: https://github.com/syslog-ng/syslog-ng
Stage 4 - Permissions
Write a short summary of the following article: https://www.redhat.com/sysadmin/linux-file-permissions-explained
Next, execute the following steps:
- Create a file called test.sh with touch
- Change the permissions to user=read, write, execute; group and others to have none
- Change ownership of the file to be root then attempt to access the file
- Change the ownership back to yourself and edit the file
- Add
#!/bin/bash
to the first line andecho hello world
to second line
- Add
- Run the script with
./test.sh
- Remove the executable permission and try to run the script again
Deliverables
- Demonstrate yourself using the Ubuntu GUI
- Show yourself accessing your Ubuntu machine via RDP
- Demonstrate syslog-ng is running
- Demonstrate syslog-ng is receiving OPNsense system logs by showing logs from OPNsense stored on your Ubuntu machine
- Submit the short summary from stage 4 to the lab drop box on eClass