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

country=SE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
network={
ssid="abcd"
psk="1234567890"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

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

country=SE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="abcd"
        psk="1234567890"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}

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 https://leanpub.com/jerpi/read#leanpub-auto-for-jessie-edit-the-dhcpcdconf-file and Norman Dunbar http://qdosmsq.dunbar-it.co.uk/blog/2016/03/does-your-raspberry-pi-3-lose-wifi-connections-after-a-while/

Openssl, calculate SKI from public key in certificate

https://tools.ietf.org/html/rfc5280#section-4.2.1.2

Extract public key from certificate in to tempfile

openssl x509 -noout -in [cert-file] -pubkey > tmp.pub.der

Locate ”BIT STRING”

openssl asn1parse -in tmp.pub.der

Extract ”clean” public key

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

Calculate hash of the public key

openssl dgst -c -sha1 pub.der

Tribut to xuf for http://certificateerror.blogspot.com/2011/02/how-to-validate-subject-key-identifier.html

Publicerat i PKI

USG

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 1.1.1.1
$ commit
$ save
$ exit

 

Malaxlimpa

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

Prereq:

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

Update schema, add attributes

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

Update schema, add object classes

$ ldapmodify -h 127.0.0.1 -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 127.0.0.1 -p 1389 -D "cn=Directory Manager" \ 
-W -x -v -c -f ./baseobject.ldif -S ./reject.ldif

Import data

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

Ubuntu Base Server 16.04

Language

English

Ubuntu

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

<No>

Country of origin of the keyboard

<Swedish>

Keyboard layout

<Swedish>

Configure the network

Hostname

ubuntu

Set up users and passwords

Full name for the new user

user one

username for your account

user

Choose a password for the new user

{password}

re-enter password to verify

{password}

encrypt home directory

<No>

Configure the clock

Is this time zone correct

<Yes>

Partition disks

Partitioning method

<Guided – use entire disk and set up LVM>

Select disk to partition

<enter>

Write the changes to disk and configure LVM

<Yes>

amount of volume group to use for guided partitioning

<Continue>

Write the changes to disk

<Yes>

Configure the package manager

<Continue>

Configuring tasksel

<No automatic updates>

Software selection

  • standard system utilities
  • OpenSSH server

<Continue>

Install the GRUB boot loader on a hard disk

<Yes>

Finish the installation

<Continue>

 

OpenDJ – reset Directory Manager’s password

Stop OpenDJ service

bin/stop-ds

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

bin/start-ds

Tribute to Ludovic Poitou https://ludopoitou.com/2011/06/30/newbie-help-how-to-reset-the-directory-managers-password/