HTTPS/SSL/TLS Verify installed certificate

Verify cert is correct openssl s_client -connect domoticz.iix.se:443 -servername domoticz.iix.se </dev/null Verify date of expiry for installed cert # HTTPS openssl s_client -connect example.com:443 -servername example.com 2>/dev/null </dev/null | openssl x509 -noout -dates # SMTP % openssl s_client -starttls smtp -connect smtp.iix.se:25 </dev/null 2>/dev/null | openssl x509 -noout -dates

Salt Cheatsheet

# List hosts sudo salt-key --list-all # Add host sudo salt-key -a hello-hostname # Apply one/several hosts sudo salt 'hello-hostname' state.apply sudo salt 'hello-*' state.apply sudo salt 'hello-hostname' test.ping sudo salt '*' state.apply users ## När något gick fel och man missade att lessa loggen sudo salt-run jobs.list_jobs sudo salt-run jobs.lookup_jid $jobid | less

March 5, 2019  |  🏷️Salt

Open port in fedora

Open port for a given zone sudo firewall-cmd --zone=FedoraServer --add-port=8080/tcp

OpenSSL / Certificate management

Working with certificates in Java This post contains a mix of java and certificate info. Note that you should definitely use the p12 format in Java. Using other types, like p8, usually end up causing issues in the end. One easy way is by creating a custom trust manager The easiest way of doing this is: (See this link for a code example on stackoverflow Create a custom trust manager with your special certs Create a trust manager with the default certs Create a custom trust manager, which takes the custom and the default trust manager and try them both Another way of doing it would be adding the certificate manually to the cacerts file....

Docker: Start terminal in Docker without limited size

Sometimes when you exec into a docker container normally, the size of the containers terminal will be much smaller than your real screen, making it not work properly. To solve this you need to set COLUMNS and LINES in the containers env: sudo docker exec -e COLUMNS="$(tput cols)" -e LINES="$(tput lines)" -it docker-container bash

December 14, 2018  |  🏷️Docker

Firefox on linux with a dark theme has black input fields

If you are using firefox on linux with a dark theme, unstyled input fields will have black background and white text. Sometimes just white text on white background. According to this bug report it has been this way for the last 17 years. To fix it, pop by about:config and add a new key-value (String): "widget.content.gtk-theme-override": "Adwaita:light". After restarting firefox, things will be as they should be.

Audio sounds crap on bluetooth headphones on Linux

So maybe sounds like crap is an overstatement, but compared to what it sounds like on windows / macos / my phone it’s not even a comparison. Apparently this is is caused by the pulseaudio-profile being set wrong. You can check available profiles by connecting to the bluetooth headphones and running pacmd list: profiles: headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown) a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: no) off: Off (priority 0, available: yes) When trying to set the profile, pacmd will refused (related to the available: no):...

No wifi drivers on macbook running linux

I recently decided to dual boot linux my macbook air from 2014 (or maybe 2015). Apparently dual booting on macOS works really well, since you will enter GRUB on normal boots, but can enter macOS by holding the alt/option key during boot. However, there are no free wifi drivers available, so you will need to download extra non-free drivers, which can be really annoying if you only have wifi to connect by, and wifi doesn’t work....

LVM: Grow LVM and resize partition

Sometimes your install a distro and it refuses to take up all available space. 1. Find out how much space we got to play with. $ sudo vgdisplay --- Volume group --- VG Name fedora System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size <49....

Installing a lightweight linux desktop environment with openbox and dwm

These are my installation notes for creating a lightweight linux desktop environment from scratch, which contains only the most necessary applications. I’ll probably update it slightly in the future, when I realize I have missed some application. It will contain both openbox and dwm, as I’m always torn between using a tiling versus a floating window manager. Mostly I prefer tiling ones, but with some applications, they simply don’t work well....