Skip to content

Instantly share code, notes, and snippets.

@sas-starbuck
sas-starbuck / createUser.sh
Created June 8, 2022 15:31
create local user account (non-admin)
#!/bin/sh
#https://gist.github.com/dimitardanailov/6acdd54ab67d5a25c0229b2fe5bbb42b
#https://apple.stackexchange.com/questions/82472/what-steps-are-needed-to-create-a-new-user-from-the-command-line/84039#84039
LOCAL_USER_FULLNAME="Testing" # The local user's full name
LOCAL_USER_SHORTNAME="testing" # The local user's shortname
LOCAL_USER_PASSWORD="password!" # The local user's password
LOCAL_USER_HINT="terrible pwd!" # The local user's password
IMAGEURL= # local user's picture, comment out if not needed, plus lines 24-25
@sas-starbuck
sas-starbuck / createAdminUser.sh
Created June 8, 2022 15:33
create local admin user
#!/bin/sh
#https://gist.github.com/dimitardanailov/6acdd54ab67d5a25c0229b2fe5bbb42b
#https://apple.stackexchange.com/questions/82472/what-steps-are-needed-to-create-a-new-user-from-the-command-line/84039#84039
LOCAL_ADMIN_FULLNAME="Full Name" # The local admin user's full name
LOCAL_ADMIN_SHORTNAME="username" # The local admin user's shortname
LOCAL_ADMIN_PASSWORD="Password123" # The local admin user's password
# this is optional:
{
"optionalFeatures": {
"acceptableApplicationBundleIDs": [],
"acceptableAssertionUsage": false,
"acceptableCameraUsage": false,
"acceptableScreenSharingUsage": false,
"aggressiveUserExperience": true,
"aggressiveUserFullScreenExperience": true,
"asynchronousSoftwareUpdate": true,
"attemptToBlockApplicationLaunches": false,
@sas-starbuck
sas-starbuck / config.json
Last active August 17, 2022 16:02
nudge-python config
{
"preferences": {
"button_title_text": "Ready to start the update?",
"button_sub_titletext": "Click on the button below.",
"cut_off_date": "2022-10-31-00:00",
"cut_off_date_warning": 14,
"days_between_notifications": 1,
"logo_path": "/Users/Shared/SA-Seal-Color.png",
"main_subtitle_text": "A friendly reminder from your local IT team",
"main_title_text": "macOS Update",
@sas-starbuck
sas-starbuck / gist:74ba95bae6c84b1b4d85f1f90bcd36d6
Last active August 18, 2022 01:10
jamf school - use rclone on many computers to sync to one or many Google Drives based on the hostname
#check if conf exists
FILE=/Users/Shared/.config/rclone/rclone.conf
if test -f "$FILE"; then
echo "$FILE exists."
else
mkdir -pv /Users/Shared/.config/rclone/
tee -a /Users/Shared/.config/rclone/rclone.conf << 'END'
[COMPUTERNAMEHERE]
type = drive
client_id = example.apps.googleusercontent.com
test
!