Skip to content

Instantly share code, notes, and snippets.

@kitzy
kitzy / unloadFDERecoveryAgent.sh
Created May 9, 2016 20:00
A script that will unload the FDERecoveryAgent if it has been running longer than 5 minutes.
#!/bin/bash
# Output all to log
exec 2>&1 >> /var/log/unloadFDERecoveryAgent.log
log()
{
NOW="$(date +"%Y-%m-%d %H:%M:%S")"
echo "$NOW": "$1"
}
@kitzy
kitzy / server.xml
Last active March 8, 2016 02:55
Server.xml configured to work behind a load balancer
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@kitzy
kitzy / disable8443_server.xml
Created March 8, 2016 02:48
Disabling Tomcat's HTTPS Connector on port 8443
<!-- <Connector URIEncoding="UTF-8" port="8443" executor="tomcatThreadPool" SSLEnabled="true" maxHttpHeaderSize="8192" maxPostSize="-1" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" protocol="HTTP/1.1" secure="true" clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1" keystoreFile="/usr/local/jss/tomcat/.keystore" keystorePass="changeit" ciphers="TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_RSA_W
@kitzy
kitzy / RemoteIPValve_server.xml
Created March 8, 2016 02:44
Setting the Remote IP Valve in server.xml
<Valve className="org.apache.catalina.valves.RemoteIpValve" />
@kitzy
kitzy / 8080_server.xml
Created March 8, 2016 02:40
A connector for Tomcat working behind a load balancer for the JSS
<Connector URIEncoding="UTF-8" port="8080" executor="tomcatThreadPool" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" proxyPort="443" scheme="https" />
@kitzy
kitzy / com.apple.screensaver.plist
Created January 16, 2016 20:35
An example screensaver plist for creating a custom configuration profile for bypassing a bug in Casper Suite v9.82.
<?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>askForPassword</key>
<integer>1</integer>
<key>askForPasswordDelay</key>
<real>0.0</real>
<key>tokenRemovalAction</key>
<integer>0</integer>
#!/bin/bash
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/path/to/logo.png"
"$jamfHelper" -startLaunchd -windowType fs -icon $icon -description "Your computer is being configured, please wait." &
@kitzy
kitzy / recoveryKeyCheck.sh
Created June 20, 2015 01:32
This script will call a policy from the JSS to issue a new recovery key if it detects that the recovery key has been used to log in.
#!/bin/bash
# Automatic FV2 Individual Recovery Key re-issue script
# written by John Kitzmiller - www.johnkitzmiller.com
#
# This script will call a policy from the JSS to issue a new recovery key
# if it detects that the recovery key has been used to log in
#
### Functions ###
@kitzy
kitzy / pound.cfg
Created June 4, 2015 21:39
This is an example pound config for load balancing a JSS
## This is an example pound config for load balancing a JSS
## Created by John Kitzmiller - www.johnkitzmiller.com
######################################################################
## global options:
User "www-data"
Group "www-data"
#RootJail "/chroot/pound"
@kitzy
kitzy / pound
Created June 3, 2015 23:39
/etc/default/pound
# Defaults for pound initscript
# sourced by /etc/init.d/pound
# installed at /etc/default/pound by the maintainer scripts
# prevent startup with default configuration
# set the below variable to 1 in order to allow pound to start
startup=1