Tag Archives: Ubuntu

Getting your Raspberry Pi to update through your school firewall

I have seen many posts on both Twitter and CAS about teachers having issues getting their class Raspberry Pis to update and install software through their school firewalls, so I thought I would share the simple solution that I have implemented at my school.

It actually leverages something that I put in place for our Ubuntu Linux servers, but works just as well for Raspberry Pi devices too.

Continue reading Getting your Raspberry Pi to update through your school firewall

Ubuntu, RAID and SMART


We have a number of our physical Linux servers set up to use Linux MD RAID to provide either RAID 1 or 5 fault tolerance on our disks. This is all great so long as it is working as expected! I came into work to find that after a reboot from a kernel update one of our servers could not bring up its swap drive. The swap partition was a RAID 1 array made up from two mirrored disks.

I began to look at mdadm to find out what was wrong. Running:

# cat /proc/mdstat

revealed that one of the drives had failed putting both arrays into degraded mode and to make matters worse the only remaining good disk had now developed errors in the partition used for swap! Thankfully the second array / partition which contained the system files was still on-line, albeit in a degraded state.

So the first thing to do was to get a new disk into the array and synchronise the data onto it. After that I needed to remove the other original disk and replace that too. Once all that was done and the data re-synchronised onto both new disks I wanted to look at how we can increase our monitoring of disks so that we don’t get in this situation again!

Continue reading Ubuntu, RAID and SMART

Moodle User Pictures from iSAMS

Having linked our Moodle installation with iSAMS to automate course creation and enrolment I began looking around at what other things we could link up and automate. Whilst spending some time on the Moodle forums, I came across this post: https://moodle.org/mod/forum/discuss.php?d=272020 which linked to a command line script someone had added to the Moodle Docs to allow for synchronisation of user profile pictures.

Continue reading Moodle User Pictures from iSAMS

RD Web and RD Gateway through Ubuntu

So I finally got our RD Web and RD Gateway servers running at school, which is great as we can have remote desktop and remote application access back to the school network without the need to muck around configuring VPN tunnels for people. The RD Gateway neatly bundles all the RDP traffic up inside a HTTPS / SSL / TLS tunnel for us.

I am not going to go into the details of that install as there are plenty of good resources out there like https://hotstickybun.com/nordvpn-for-kodi for example; and it drove me round the bend a bit! Anyway, it all works now 😉

Accessing from home on my Windows 7 machine worked a treat, as did accessing them from my Android phone using the Microsoft RDP App. I haven’t tried OSX or iOS as I don’t have access to those devices; but I am sure that Microsoft’s RDP Client for OSX will deliver.

So then I tried to connect to the RD Session Host through my Ubuntu machine…

Continue reading RD Web and RD Gateway through Ubuntu

iSAMS to Moodle Course Enrolment – Part 3

This is the third post about setting up iSAMS and Moodle to perform course and user enrolment synchronisation. Here are links to the other sections:

  1. Prerequisites and Assumptions
  2. Part 1 – Setting up your MSSQL Server
  3. Part 2 – Setting up your Apache / PHP server
  4. Part 3 – Setting up Moodle

Set up Moodle to read our iSAMS Data

So now we have a LAMP server configured ready for Moodle which can also read our MSSQL database with all the course enrolment data we are copying over from iSAMS; it is time to get Moodle configured.

Continue reading iSAMS to Moodle Course Enrolment – Part 3

iSAMS to Moodle Course Enrolment – Part 2

This is the second post about setting up iSAMS and Moodle to perform course and user course enrolment synchronisation. Here are links to the other sections:

  1. Prerequisites and Assumptions
  2. Part 1 – Setting up your MSSQL Server
  3. Part 2 – Set up Apache to connect to MS SQL Server
  4. Part 3 – Setting up Moodle

Set up Apache to connect to MS SQL Server

We now need to configure our LAMP / Moodle server to be able to talk to MSSQL so that we can retrieve the data we prepared in our new database in the previous post. Again you will need to have already set up your LAMP / Moodle server by this point. Please either set it up as per the official Moodle documentation or as per my previous post; then come back here.

Continue reading iSAMS to Moodle Course Enrolment – Part 2

iSAMS to Moodle Course Enrolment – Part 1

I have begun looking at using Moodle at my school and how we can integrate it into our existing databases so to remove as much administrative burden as possible. I have used Moodle on and off for many years now and one of the first things I always do is set it up to use LDAP Authentication for its log-ons. This makes it really easy to allow users to use their Active Directory log-ons to access your Moodle install. I will not go in to details of that here as it is already well documented over on the Moodle Docs site.

However, one thing that had always proved harder for me with Moodle was the integration of course / class enrolments with the MIS that the school was using. Previously that has normally been Capita SIMS. Capita’s licensing meant I was not allowed to play around in the database back-end of that system to try and create a streamlined process. My current school however uses iSAMS for its MIS system and with this system all custom reporting is done through Microsoft’s SSRS. The upshot of this is that you have full access to the MSSQL database back-end of your MIS and you can begin to manipulate the data using the tools that Microsoft provide you with MSSQL. With this in mind I began looking at the Moodle External Database Enrolment Module to see if we could get a live link between our Moodle install and the course enrolment data already being held and maintained in our school MIS, iSAMS.
Continue reading iSAMS to Moodle Course Enrolment – Part 1

Installing a Ubuntu Server for Moodle

I have written this post, not as a replacement for the very good documentation that is available over on the Moodle Docs site, but as a way for myself to refer back to the process I carry out when installing Moodle.

I am using Ubuntu Server 14.04 for my operating system, so these steps will specific to that distribution. They may well translate into Debian without any editing but I have not tested that. If you are using a different operating system then your steps will vary somewhat.

The reason for choosing Ubuntu 14.04 for my OS is not only that it is the latest LTS version of Ubuntu, but also that it comes with PHP version 5.5.9 in it’s package repository. Ubuntu 12.04 only comes with PHP version 5.3.10. In PHP version 5.4 support for LDAP Paged results was introduced which means that if you have more than 1000 users in any of your MS AD LDAP containers PHP will be able to retrieve them all.

Set up your LAMP Server ready for Moodle

Continue reading Installing a Ubuntu Server for Moodle

Nagios Speedtest plugin

*** UPDATE ***

All the code for this plugin is now hosted over on GitHub: https://github.com/jonwitts/nagios-speedtest.

*** UPDATE ***

Version 1.2 is now available. You can now specify a Speedtest Mini Server to check against. If you are updating to this version you will need to change your Nagios check commands to include the new “l” argument to define if you are checking against an internal (Mini) or external Speedtest server. Download links both here and on Nagios Exchange are updated to the new version.

*** EDIT ***

Version 1.1 of the script is now released with some improvements suggested by Sigurdur Bjarnason via email. The download link below is updated to point to the new version and the version on Nagios plugins is updated too.

The main change is that you now need to define the location of the speedtest binary in the script before it will run, and you must now also pass the Server ID of the Speedtest server you want to check against in the command. See the usage of the script for more details.

*** ***

This week we were trying to download some files from work and the download speed was slow to say the least. I then made a SSH connection to my PC at home and downloaded them from there and then copied the files back to work with WinSCP; all of this quicker than downloading directly at work!

This lead us to wondering if there was a Linux utility for testing Internet upload and download speed on the CLI. A quick Google search later lead us to: https://github.com/sivel/speedtest-cli . The developers of the small Python utility describe it quite simply as: “Command line interface for testing internet bandwidth using speedtest.net”

I installed this on both my home PC and our Nagios server at work and begun to play around with what we could do with it. I have long thought that it would be nice to be able to monitor and graph the upload and download speed of our connection so that we can spot trends as to when we are getting Internet slow-downs. To date I had not found a Nagios plugin which would do what I wanted, but this little CLI tool could quite easily be manipulated to my own ends!

Continue reading Nagios Speedtest plugin

Ubuntu Server 12.04 “Cannot display this video mode”

I have been installing a new Ubuntu server on some old hardware at work this week (HP Proliant DL360 G4) to configure a Free-Radius server for our site-wide WiFi solution; however I fell at the first hurdle!

After installing Ubuntu as normal and rebooting the server, I was presented with a black screen displaying “Cannot display this video mode”. Very annoying!

Continue reading Ubuntu Server 12.04 “Cannot display this video mode”