Skip to content

Instantly share code, notes, and snippets.

@durd
durd / securestacking.md
Last active February 7, 2022 13:16
Encountered an annoying and seemingly impossible to Google error when stacking two 9500's

Secure StackWise

When trying to stack two 9500s we encountered the error below, the switch rebooted but to our surprise the only active switch also rebooted and caused an outage in the network.
SESA: Master authentication failure. Err: 36

While Googling I found a NIST document with the acronym SESA and something about secure stacking. Lo and behold show secure-stackwise-virtual is available in the commandline.

Apparently, the active switch had been configured with Secure Stackwise, but the new standby had not. The Secure StackWise configuration is not evident in the show running-configuration so we simply missed that it was configured.
Once we had configured the authentication key and reloaded the standby switch, we were able to connect the standby without issues.

find . -type f -print0 | xargs -0 ls -l | awk '{ n=int(log($5)/log(2)); if (n<10) { n=10; } size[n]++ } END { for (i in size) printf("%d %d\n", 2^i, size[i]) }' | sort -n | awk 'function human(x) { x[1]/=1024; if (x[1]>=1024) { x[2]++; human(x) } } { a[1]=$1; a[2]=0; human(a); printf("%3d%s: %6d\n", a[1],substr("kMGTEPYZ",a[2]+1,1),$2) }'
@durd
durd / .com.apple.TimeMachine.quota.plist
Last active February 20, 2022 20:37
time machine smb/samba config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GlobalQuota</key>
<integer>350000000000</integer>
</dict>
</plist>
@durd
durd / lsadd.pl
Created June 12, 2020 07:23
sendmail mailqueue management
#!/usr/local/bin/perl
use strict;
my $mqueue_directory = "/var/spool/mqueue";
my %occurrences;
use File::Find;
# Recursively find all files and directories in $mqueue_directory
find(\&wanted, $mqueue_directory);
@durd
durd / spaghetti_sauce.md
Last active May 24, 2020 14:00
Best Spaghetti and Sauce

Best Spaghetti and Sauce

I double the recipe always as it freezes well.
This is the original recipe without 450-500gr of hamburg I usually add to the doubled recipe.

Makes ~2liters doubled - depending on water added.

  • olive oil
  • 1 chopped onion
  • 1 small carrot
  • 1 small celery stalk
@durd
durd / dnsmasq.postconf
Created May 9, 2020 11:45
asuswrt-merlin dnsmasq postconf-script with ra-names enabled
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_replace "dhcp-range=lan,::,constructor:br0,ra-stateless,64,600" "dhcp-range=lan,::,constructor:br0,ra-stateless,ra-names,64,600" $CONFIG
@durd
durd / 80-ifupdown.rules
Created January 23, 2019 23:53
vlan with systemd
# /lib/udev/rules.d/
# Allow rfkill for users in the netdev group
KERNEL=="rfkill", MODE="0664", GROUP="netdev"
# Handle allow-hotplug interfaces
SUBSYSTEM=="net", ACTION=="add|remove", RUN+="ifupdown-hotplug"
SUBSYSTEM=="net", RUN+="vlan-network-interface"