Configure wifi

Find the wifi interface name

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
3: wlxxxxxxxxxxxxx: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Bring the wifi interface up

$ sudo ifconfig wlxxxxxxxxxxxxx up

Scan for wifi networks

$ sudo iwlist wlxxxxxxxxxxxxx scan

Edit /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1

Do NOT modify /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Edit /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Get power save mode of wifi device

sudo iw dev wlan0 get power_save

Set power save mode off

sudo iw dev wlan0 set power_save off

Tribute to Malcolm Maclean and Norman Dunbar

Openssl, calculate SKI from public key in certificate

Extract public key from certificate in to tempfile

openssl x509 -noout -in [cert-file] -pubkey >


openssl asn1parse -in

Extract ”clean” public key

openssl asn1parse -in -strparse 19 -out pub.der

Calculate hash of the public key

openssl dgst -c -sha1 pub.der

Tribut to xuf for

Publicerat i PKI


error: dhcpd uid lease … for client … is duplicate on net_LAN_eth1_…

$ clear dhcp leases

Create DNS entries

$ configure
$ set system static-host-mapping host-name host1 inet
$ commit
$ save
$ exit



50g jäst
1 1/2 l vatten (ljummet)
1 1/2 kkp bakmalt
4 dl sirap
1 1/2 kkp socker
4 kkp vetemjöl
4 msk salt
1 1/2 kkp lingonsylt
1.8 – 2 kg rågmjöl (för mycket så blir det stabbigt)

Blanda vatten, sirap och lingonsylt först sen jäst, låt stå 5-10 min
Blanda i malt, vetemjöl, socker, salt och rågmjöl
Låt jäsa i 6 timmar
Häll ut smeten i långpanna med smörpapper under och platta till den med fuktig hand så den blir jämntjock, lägg ett smörpapper ovanpå smeten
Grädda i 3 timmar i 150 grader
Pensla med kaffe varje timme
Låt brödet svalna i ugnen med smörpapperet kvar
Skär i lagom bitar

Publicerat i Mat

Migrate from OpenDJ to 389DS


  • 389DS running on Ubuntu 16
  • export.ldif from OpenDJ-2.5.0-Xpress1
  • user schema files

Update schema, add attributes

$ ldapmodify -h -p 1389 -D "cn=Directory Manager" \ 
-W -x -v -f ./user-at.ldif

Update schema, add object classes

$ ldapmodify -h -p 1389 -D "cn=Directory Manager" \
-W -x -v -f ./user-oc.ldif

Prepare import file

  • Remove objects where objectclass =*subentry* from export.ldif
  • Remove attributes from export.ldif. entryUUID,aci:,createTimestamp,creatorsName,modifyTimestamp,modifiersName,ds-rlim,ds-privilege-name,pwdfailuretime,pwdChangedTime
$ sed '/entryUUID\|aci:\|createTimestamp\|creatorsName\|modifyTimestamp\|modifiersName\|ds-rlim\|ds-privilege-name\|pwdfailuretime\|pwdChangedTime/d' export.ldif > import.ldif

Add base object

$ ldapadd -h -p 1389 -D "cn=Directory Manager" \ 
-W -x -v -c -f ./baseobject.ldif -S ./reject.ldif

Import data

$ ldapadd -h -p 1389 -D "cn=Directory Manager" \ 
-W -x -v -c -f ./import.ldif -S ./reject.ldif

Ubuntu Base Server 16.04




Install Ubuntu Server

Select a language

English – English

Select your location

Other, Europe, Sweden

Configure locales

United States – en_US.UTF-8

Configure the keyboard,

Detect keyboard layout


Country of origin of the keyboard


Keyboard layout


Configure the network



Set up users and passwords

Full name for the new user

user one

username for your account


Choose a password for the new user


re-enter password to verify


encrypt home directory


Configure the clock

Is this time zone correct


Partition disks

Partitioning method

<Guided – use entire disk and set up LVM>

Select disk to partition


Write the changes to disk and configure LVM


amount of volume group to use for guided partitioning


Write the changes to disk


Configure the package manager


Configuring tasksel

<No automatic updates>

Software selection

  • standard system utilities
  • OpenSSH server


Install the GRUB boot loader on a hard disk


Finish the installation



OpenDJ – reset Directory Manager’s password

Stop OpenDJ service


Generate an encoded password for Directory Manager

bin/encode-password -s SSHA512 -c MyN3wPa88w0rd
Encoded Password:  "{SSHA512}BmU5JuOZW6c0ngGetV1J8EG5UgWqyS5k/2JoJEEnx/V/c6EbnXvFwyLFG7ZWZm3oAwCmlht28OYnwQK+X8yLMV+dZJ3cBvOd"

Edif the config/config.ldif file and replace userpassword.

dn: cn=Directory Manager,cn=Root DNs,cn=config
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
objectClass: ds-cfg-root-dn-user
userpassword: {SSHA512}BmU5JuOZW6c0ngGetV1J8EG5UgWqyS5k/2JoJEEnx/V/c6EbnXvFwyLFG7ZWZm3oAwCmlht28OYnwQK+X8yLMV+dZJ3cBvOd

Start OpenDJ service


Tribute to Ludovic Poitou