<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Notes on ZachFi</title>
    <link>https://zach.fi/notes/</link>
    <description>Recent content in Notes on ZachFi</description>
    <image>
      <title>ZachFi</title>
      <url>https://zach.fi/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://zach.fi/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.148.2</generator>
    <language>en</language>
    <lastBuildDate>Sun, 06 Jun 2021 16:13:02 -0700</lastBuildDate>
    <atom:link href="https://zach.fi/notes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Adding LDAP Replication</title>
      <link>https://zach.fi/notes/2021_replication/</link>
      <pubDate>Sun, 06 Jun 2021 16:13:02 -0700</pubDate>
      <guid>https://zach.fi/notes/2021_replication/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://tylersguides.com/guides/openldap-multi-master-replication/&#34;&gt;https://tylersguides.com/guides/openldap-multi-master-replication/&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;build-the-new-jail&#34;&gt;Build the new jail&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;bastille create auth12 13.0-RELEASE 2001:n0p3:n0p3:20::123/120 lo1
bastille template auth12 larch/puppet
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copy the backup files to the new host.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cp /usr/local/bastille/jails/auth11/root/var/backups/ldap{,_confg}.db ~zach/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Move the files into place.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mv ~zach/ldap{,_config}.db /usr/local/bastille/jails/auth12/root/var/backups/
bastille console auth12

service slapd stop
rm /usr/local/etc/openldap/slapd.conf
rm -rf /usr/local/etc/openldap/slapd.d/*
slapadd -F /usr/local/etc/openldap/slapd.d/ -n0 -l /var/backups/ldap_config.ldif
slapadd -F /usr/local/etc/openldap/slapd.d/ -n1 -c -l /var/backups/ldap.ldif
service slapd start
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;&lt;/h1&gt;
&lt;p&gt;Load the module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleLoad: syncprov
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add all of the peers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Schema troubles</title>
      <link>https://zach.fi/notes/schema_troubles/</link>
      <pubDate>Mon, 17 Feb 2020 14:30:18 -0800</pubDate>
      <guid>https://zach.fi/notes/schema_troubles/</guid>
      <description>&lt;p&gt;Auth8 has been loosing some custom schema for some reason I haven&amp;rsquo;t been able
to identify.  I&amp;rsquo;m wondering if some upgrade caused some issue when I didn&amp;rsquo;t
handle the upgrade properly, so perhaps loading the database from backup is the
right move.&lt;/p&gt;
&lt;p&gt;First, create a new jail for auth9 on olaf.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;profile::jail::host::jails&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;auth9&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ip4_addr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;%{hiera(&amp;#39;profile::jail::host::default_interface&amp;#39;)}|172.16.20.111/27&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ip6_addr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;%{hiera(&amp;#39;profile::jail::host::default_interface&amp;#39;)}|2001:111:1111:20::515/120&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;properties&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;host_domainname&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;l.znet&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Spin up the jail and sign the cert.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Replacing the auth jails</title>
      <link>https://zach.fi/notes/jail_replacement/</link>
      <pubDate>Sat, 29 Aug 2015 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/notes/jail_replacement/</guid>
      <description>&lt;p&gt;Reuk has been having trouble, and as I move to iocage I no longer want to dance
around the idea that reuk is running a set of jails configured in one way, and
the rest of my prod systems are running iocage in a different way.  This will
will remove the old style jails and convert everything to use iocage.  These
two jails (auth2 and auth3) both sit on reuk currently, and are some of the
last to be converted because my jail provisioning system uses ldap as the data
storage mechanism.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Crash Recovery</title>
      <link>https://zach.fi/notes/crash_recovery/</link>
      <pubDate>Thu, 14 May 2015 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/notes/crash_recovery/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been moving from an internal ldap module to one in Puppet Labs.  Through
this process I&amp;rsquo;ve forgotten about sasl.  Installing the openldap-client package
on the system and upgrading heimdal to the latest version caused the packages
to come from upstream repositories that do not have the custom options
necessary to glue together heimdal and openldap.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ACL Recovery</title>
      <link>https://zach.fi/notes/acl_recovery/</link>
      <pubDate>Sun, 12 Oct 2014 17:26:31 +0000</pubDate>
      <guid>https://zach.fi/notes/acl_recovery/</guid>
      <description>&lt;p&gt;I have managed to break everything.&lt;/p&gt;
&lt;p&gt;Ensure &lt;code&gt;/etc/hosts&lt;/code&gt; contains both IPv6 and IPv4 for the FQDN of the local server.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t fuck up the ACL.  Ensure that you allow unknown users to at least authenticate.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configuration updates</title>
      <link>https://zach.fi/notes/config_updates/</link>
      <pubDate>Mon, 28 Apr 2014 21:27:26 +0000</pubDate>
      <guid>https://zach.fi/notes/config_updates/</guid>
      <description>&lt;p&gt;The flags need modifying in &lt;code&gt;rc.conf.&lt;/code&gt;  For setting up &lt;code&gt;auth3.znet&lt;/code&gt;, I needed the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;slapd_flags&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;-h &amp;#34;ldaps://10.210.18.36/ ldaps://auth3.znet&amp;#34;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This needs to contain the URL that is used as the &lt;code&gt;olcServerID&lt;/code&gt; in the &lt;code&gt;cn=config,&lt;/code&gt; otherwise &lt;code&gt;slapd&lt;/code&gt; will not start.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SASL configuration</title>
      <link>https://zach.fi/notes/sasl_config/</link>
      <pubDate>Sun, 02 Mar 2014 12:22:21 +0000</pubDate>
      <guid>https://zach.fi/notes/sasl_config/</guid>
      <description>&lt;p&gt;To allow passwords like &lt;code&gt;{SASL}zach@ZNET&lt;/code&gt; for SASL pass-through, the correct permissions are needed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;chown :ldap /var/run/saslauthd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>SASL config updates</title>
      <link>https://zach.fi/notes/sasl_config_updates/</link>
      <pubDate>Sat, 01 Mar 2014 17:06:24 +0000</pubDate>
      <guid>https://zach.fi/notes/sasl_config_updates/</guid>
      <description>&lt;p&gt;Need to add:&lt;/p&gt;
&lt;p&gt;pwcheck_method: saslauthd
saslauthd_path: /var/run/saslauthd/mux&lt;/p&gt;
&lt;p&gt;to /usr/local/lib/sasl2/slapd.conf&lt;/p&gt;
&lt;p&gt;ldapsearch -x -H ldaps://auth2.znet -b &amp;quot;&amp;quot; -s base supportedSaslMechanisms&lt;/p&gt;</description>
    </item>
    <item>
      <title>Complete Redeploy</title>
      <link>https://zach.fi/notes/complete_redeploy/</link>
      <pubDate>Mon, 17 Feb 2014 00:00:00 +0000</pubDate>
      <guid>https://zach.fi/notes/complete_redeploy/</guid>
      <description>&lt;p&gt;After applying puppet to install the needed packages and make sure the
directories and such are in place, I used the fabric job &lt;code&gt;build_new&lt;/code&gt; to deploy
&lt;code&gt;auth2.l.znet&lt;/code&gt;. The following was performed to get the server ready to
serve clients.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;rc.conf&lt;/code&gt; configuration on the auth boxes have the following manual
additions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kerberos5_server_enable=&amp;quot;YES&amp;quot;

slapd_enable=&amp;quot;YES&amp;quot;
slapd_cn_config=&amp;quot;YES&amp;quot;
slapd_flags=&#39;-h &amp;quot;ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldaps://[2001:111:1111:1ab::18:4111]/ ldaps://10.210.18.35/&amp;quot;&#39;
slapd_sockets=&amp;quot;/var/run/openldap/ldapi&amp;quot;
slapd_krb5_ktname=&amp;quot;/etc/krb5.keytab&amp;quot;

saslauthd_enable=&amp;quot;YES&amp;quot;
saslauthd_flags=&amp;quot;-a kerberos5&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;kerberos&#34;&gt;Kerberos&lt;/h3&gt;
&lt;p&gt;Setting up the kerberos slave was pretty simple.
On all slave kerberos servers, the following has been added to &lt;code&gt;inetd.conf&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
