Skip to content

Instantly share code, notes, and snippets.

@felag
felag / gist:87c1616a5c2d98c091d0b1172c2413e9
Created March 6, 2020 14:50 — forked from Shaltz/gist:1d65a07a0901a36fb7f1
HOW TO fix openLDAP checksum error on config files
(source : http://injustfiveminutes.com/category/openldap)
How to fix “ldif_read_file: checksum error”
Posted on October 28, 2014
15
Well, in spite of you did read a banner saying “# AUTO-GENERATED FILE – DO NOT EDIT!! Use ldapmodify.” you ignored it and made some manual modifications in any of the LDIF files in /etc/ldap/slapd.d/.
Don’t worry it happened to me too :) When you need to quickly setup an openLDAP server for development it is pretty much easier to tweak these files although the recommended way is to use ldapmodify tool. But if you change the LDIF files in cn=config manually, their contents and checksums won’t match, which is not fatal, but is annoying when using tools such as slapcat:
@felag
felag / term_title.sh
Last active October 17, 2019 15:02 — forked from sjpp/term_title.sh
# This code can be used as an ssh alias in order to get
# target hostname in title as well as changin background color
# Usage example: sss r user@host.domain.org
sss() {
case "$1" in
r ) _REMOTE_BGCOLOR="#2F0100" ;;
v ) _REMOTE_BGCOLOR="#003611" ;;
n ) _REMOTE_BGCOLOR="#111111" ;;
@felag
felag / Dockerfile.debian10
Last active June 19, 2019 16:01 — forked from raoulbhatia/Dockerfile.debian10
BackupPC Debian 10 Buster Dockerfile
FROM debian:buster
LABEL maintainer="fernando.lagrange@probesys.com"
#######################################
RUN apt -y update && apt -y install \
sudo \
wget \
git \
@felag
felag / schema2ldif.sh
Created October 19, 2018 13:27 — forked from markllama/schema2ldif.sh
Convert LDAP Schema to LDIF
#!/bin/bash
#
# Stolen from https://stuckinadoloop.wordpress.com/2011/04/14/script-to-convert-openldap-schema-files-to-ldif-format/
SCHEMAD=/etc/openldap/schema
SCHEMAS='dhcp.schema'
tmpd=`mktemp -d`
pushd ${tmpd} >>/dev/null