Skip to content

Instantly share code, notes, and snippets.

View smco-lee's full-sized avatar

Lee Jones smco-lee

View GitHub Profile
@smco-lee
smco-lee / add_daemon_user.sh
Last active November 27, 2023 15:20
Adds a daemon only user in OS X (taken from http://serverfault.com/a/532860/329010)
#!/bin/bash
if (( $(id -u) )) ; then
echo "This script needs to run as root"
exit 1
fi
if [[ -z "$1" ]] ; then
echo "Usage: $(basename $0) [username] [realname (optional)]"
exit 1