Skip to content

Instantly share code, notes, and snippets.

@adriangrigore
Last active August 29, 2015 14:17
Show Gist options
  • Save adriangrigore/8b0588e88889cf66ceeb to your computer and use it in GitHub Desktop.
Save adriangrigore/8b0588e88889cf66ceeb to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -lt 1 ]; then
echo "usage: .bootstrap login [fullname]"
exit 1
fi
useradd -vm -k /var/empty -c "$2" -G wheel -G operator -s /bin/sh -L staff $1
passwd $1
echo 'permit nopass keepenv { PATH PS1 } :wheel' > /etc/doas.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment