Skip to content

Instantly share code, notes, and snippets.

@pmbaumgartner
pmbaumgartner / cloud-init.yaml
Last active May 8, 2024 15:01
Multipass & Docker Setup
#cloud-config
package_upgrade: true
ssh_authorized_keys:
- <your key>
packages:
- apt-transport-https
- ca-certificates
- curl
@yumenohikari
yumenohikari / README.md
Last active July 17, 2024 17:17
Active Directory LDAP auth for Home Assistant

Active Directory LDAP auth for Home Assistant

This script allows users to log in to Home Assistant using their sAMAccountName or userPrincipalName identifiers without any special requirements for the ldapsearch or curl utilities. Instead, it requires the ldap3 Python module, but there are ways to install that locally so it can even be used in supervised / Home Assistant OS installs.

Editing for use in your installation

Obviously most of the configuration values in the script need to be edited to work in your environment.

  • SERVER - the DNS name of your AD domain, or the name or IP of a specific domain controller.
  • HELPERDN - the DN (distinguishedName attribute) of the service account you're using to search LDAP for the desired user.
  • HELPERPASS - the password for that service account.
@richmilne
richmilne / convert-letsencrypt-java-keystore.sh
Last active October 18, 2020 17:46
Convert your domain's Let's Encrypt certificate (along with their intermediate certs) into a keystore that can be used with Java apps - such as Atlassian's Confluence
#!/usr/bin/env bash
# A codificiation of the steps outlined at
# https://ordina-jworks.github.io/security/2019/08/14/Using-Lets-Encrypt-Certificates-In-Java.html
# that I found relevant in getting my LE certs to work with our Confluence install.
# That page, and other sources, suggest that you might also have to import ALL the LE intermediate
# certs into the default Confluence / Java keystore ($JRE_HOME/lib/security/cacerts)
NOTIFY=webmaster@example.com
DOMAIN=www.example.com