Sudoers NOPASSWD Option Not Working

Although not good security practice, it can be helpful for a user to account to have at least some (or all) sudo ability without the need to re-enter the user’s password to gain sudoers. By adding the user within the file /etc/sudoers (via visudo is recommended for Ubuntu Linux), with the following, you can ensure … Read more

Exim – Address Re-Write (Flattening Sub-Domain)

We had an interesting issue where our EXIM configuration was flattening a subdomain’s “From” address, i.e. it was re-writing an email’s From (HFrom) and MailFrom (return-path/envelope-from) headers to @domain.com addresses, i.e. to catch emails such as root@mymachine.domain.comand re-write the From (HFrom) and MailFrom (return-path/envelope-from) to root@domain.com instead. Problem was, this configuration wasn’t documented, so needed a bit of investigation; but is also a good learning point … Read more

Storing Values (e.g. Secrets) in Environment Variables with Terraform – Output Raw

Firstly, a disclaimer. Although you can store values, specifically secrets (e.g. passwords) within Environment Variables so that you are not storing them in your Terraform template code there are better ways, for example by use of a formal Secrets Management solution. However, this article will show you how you can use Environment Variables to “safely” … Read more

More Adventures in Ansible – Bind Example

Following on from a previous article https://geekmungus.co.uk/?p=4510 we now investigate some more into using Ansible for configuration management and installations. As something we can use as an example, we’re going to setup a simple Bind DNS server, which we can use to explore how to manage the installation of Bind and it’s configuration within Ansible. … Read more

SSH Legacy Key Algorithms

Sometimes you have some kit that is just old and isn’t supporting the recent (and secure) key algorithms. If you connect from a client without the correct set of ciphers available, so the client and the server can come to some agreement on a mutually supported cipher set, you’ll see an error such as: If … Read more

Ping Scan a Subnet – Simple

If you need to perform a Ping scan of a subnet, you can use the following command, its quick and dirty approach, although its not really that quick when it comes to actually running. The below will scan the subnet 192.168.1.0/24, from 192.168.1.1 to 192.168.1.254. If you want to speed things up a bit, you … Read more