Skip to content

Instantly share code, notes, and snippets.

View xabim's full-sized avatar

Javier Martí xabim

View GitHub Profile
sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13,
sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality
that has long been provided by dscl and adds new features available only in 10.13.
sysadminctl can be used to change user passwords, create new users (including automatically provisioning
the user home folder) or check the status of a new-to-10.13 security feature named SecureToken.
SecureToken is a user attribute like password type or user home location. SecureToken is not publicly
documented by Apple so it is not possible to provide a full technical description, but in practice one
needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can
unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 30, 2024 04:53 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@corford
corford / gist:9a206664bb8278c8243821d236665d94
Created September 17, 2017 17:45
Creating a Root CA, intermediate Sub-CA and end entity cert
This gist gives you the commands and config necessary to quickly and safely:
- Create a Root Certififacte Authority (valid until the year ~2045 and whose key is meant to be stored somewhere secure and hard to get at e.g. on USB key in an off-prem vault)
- Create an intermediate sub-root certificate authority (which is used for day to day signing of end-entity certs)
- Create an end-entity cert (e.g. for securing nginx/apache)
For more background, see: https://developers.yubico.com/PIV/Guides/Certificate_authority.html
@leevigraham
leevigraham / Generate ssl certificates with Subject Alt Names on OSX.md
Last active June 11, 2024 09:48
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

We're going to generate a key per project which includes multiple fully qualified domains. This key can be checked into the project repo as it's intended for local development but never used on production servers.

Save ssl.conf to your my_project directory.

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

@tapickell
tapickell / sep
Created December 2, 2016 19:25
Mcafee Endpoint Killer
#!/bin/bash
# relaunch with sudo if we aren't root
if [[ $EUID -ne 0 ]]; then
echo "$0: relaunching as sudo $0 $1 $USER"
sudo "$0" $1 $USER
exit $?
fi
real_user=$USER
@WinSe7en
WinSe7en / ReadMe.txt
Created July 7, 2016 04:53
Mac Symantec Uninstall
********* RemoveSymantecMacFiles.command 7.0.49 *********
WARNING: This script will remove all files and folders created by Symantec
Mac OS X products (LiveUpdate Administration Utility files) and
any files within those folders. Therefore, you will lose ALL files
that reside in those folders, including any that you have created.
Usage: RemoveSymantecMacFiles.command [-CcdeFfghIikLlmpQqRrV] [-QQ] [-re] [volume ...]
Summary: If no option or volume is specified, then all Symantec files are
#!/bin/sh
# Determines who is logged in and then kills SEP and relaunches sans reboot.
# Get logged in user from /dev/console
loggedInUser=`ls -l /dev/console | awk '{ print $3 }'`
if [ "$loggedInUser" != "admin" ]
then
launchctl unload /Library/LaunchDaemons/com.symantec.Sched501-1.plist
@lambdalisue
lambdalisue / sep
Created June 13, 2015 02:31
Start/Stop Symantec Endpoint Protection on OS X
#!/usr/bin/env bash
# relaunch with sudo if we aren't root
if [[ $EUID -ne 0 ]]; then
echo "$0: relaunching as sudo $0 $1 $USER"
sudo "$0" $1 $USER
exit $?
fi
real_user=$USER
@darrenpmeyer
darrenpmeyer / autobuild-openconnect-7-ubuntu.sh
Last active June 10, 2020 16:22
Autobuild script for OpenConnect 7 (Ubuntu 14/15/16 trusty/vivid/xenial)
#!/usr/bin/env bash
## NOTE! OpenConnect is now on Version 8, and this is only for historical use
## See https://gist.github.com/darrenpmeyer/1a56d0d4817352998fe9d7cfe5a79684 for new script
oc_ver="7.08"
echo "Autobuild OpenConnect $oc_ver"
echo " "
echo "This script uses apt-get and make install via sudo rights"
echo "To simplify this, we're going to use sudo -v to pre-authenticate you"
@steve-jansen
steve-jansen / README.md
Last active May 21, 2024 04:59
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep