Posts By: jonny

Arduino Serial Port Menu Greyed Out

On Linux Mint (Ubuntu) I had installed the Arduino IDE from the repository and that had installed version 1.0.5. Despite setting the permissions on the Arduino USB device, the ‘Serial Port’ option in the IDE menu was greyed out and would not allow for selecting the device – it thus defaulted to using COM1 –… Read more »

Resetting Drained Slurm Node

After barking up the wrong tree for a while I discovered via StackExchange how to reset a Slurm Node reporting as drained. Run the scontrol command then update the node as shown in the following example commands (amend the word jacob here to the name of your node):

 

MySQL GRANT SELECT on a demo database to all users

MySQL access to all users

I needed to give all students read access to a demo database and did so with: mysql> GRANT SELECT ON gameofthrones.* TO ”@localhost; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec)    

Kerberos Keytab File Creation on Ubuntu

To create a kerberos keytab file on Ubuntu and with the kerberos packages installed (e.g. sudo apt-get install krb5-user )

After completing those steps there should be a keyfile created in the current directory. That keytab file can be used instead of using a password. For example:

   

Apache: unable to open logs

In the annals of “Everyday is a learning day”. I have an Apache server hosting student websites, and the number of websites grew to over 700 within a day and Apache was complaining with error:

It took a little while to narrow down the problem as I assumed there was a path that did… Read more »

Customise the Unity Launcher from Command Line

I am rolling out some Linux desktops, specifically Ubuntu, and I wanted to customize the icons available in the Unity Launcher. I wanted to remove the LibreOffce Calc and Impress icons and the darned ‘Amazon’ one, so: Create a new gschema override file for our customisations:

Add some content (the com.canonical.Unity.gschema.xml file in the… Read more »

Create Password Hashes From the Command Line

I wanted to generate a password hash for use in the /etc/shadow file. My local Linux Mint (Ubuntu) Desktop already has mkpasswd available, your distribution may vary.

This prompts for the password and will generate the hash.    

Locating Excessive Inode Usage

The command to list the directories using the most inodes is:

However, I first needed to narrow down the directory under root that might be causing the problem:

showed that the root directory (/) was the problem. But I did not need to scan all directories as some had terabytes of files so:… Read more »

Powershell Script to Set Computer Name Based on DNS

This Powershell script will use nslookup to query a DNS Server to get the hostname and use that result to set the computer name. If you use this you will need to amend as necessary including the address of the DNS Server (I have added the Google one here for illustration) and I am filtering… Read more »

CentOS 7 as NAT Gateway for Private Network

centos logo

The scenario is a small private network connected via a switch and using 192.168.0.* addresses. One of the machines (let’s call it RTR001) on the network has two network interface cards. One with an address on the 192.168.0.* network and another providing wider network (& internet) access on a 123.111.123.* network. This machine (RTR001) will… Read more »