Menu

USB device encrypted LVM on LUKS

dth

Let’s encrypt an external USB hard disk drive. Get root already and type lsblk. Then insert the USB key and check its name by typing lsblk again. In my case, it was sdb1, but yours might be different. Get yours right, or bad things can happen to your other devices.

[root@slayer dth]# lsblk
NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
...
sdb                       8:16   0   1.8T  0 disk  
└─sdb1                    8:17   0   1.8T  0 part  
...

Read More →

qAVR – Script to compile a C program, generate the hex and flash the microcontroller

dth

This shell script will compile a C program, generate an hex file and flash it to an AVR microcontroller.

For updates, check my github repository: https://github.com/xdth/qavr


Read More →

1KHz signal generator with a 555 timer

dth



555-ic-astable-1000hz.asc

555 IC Formulas

dth

## Astable waveforms

Charge time (output high)

t1 = 0.693(Ra+Rb)C

Discharge time (output low)

t2 = 0.693(Rb)C

Total period

T = t1+t2 = 0.693(Ra+2Rb)C

Frequency of oscillation

f = 1/T = 1.44/(Ra+2Rb)C

Read More →

Configuring a SAML IDP with LDAP as authentication source

dth

In this setup, the SAML IDP will be available at example.com/auth and we will use the ldap server configured in this post.

Start by moving to the directory above the DocumentRoot for the domain. Let’s say that it is /var/www/example.com, so

cd /var/www/

Download the latest simplesamlphp version

wget https://simplesamlphp.org/res/downloads/simplesamlphp-1.14.4.tar.gz && tar xvfz simplesamlphp-1.14.4.tar.gz

Read More →

Installing and configuring LDAP and phpldapadmin

dth

This will be a minimal setup. It’s a good idea to start by doing an update and upgrade on your system. In debian, use:

apt-get update && apt-get upgrade

Install the packages (set and confirm admin password)

apt-get install slapd ldap-utils phpldapadmin

Then vim /etc/ldap/ldap.conf and include:

BASE dc=example,dc=net
URI ldap://127.0.0.1

Read More →