Skip to content

Instantly share code, notes, and snippets.

@mjhika
mjhika / adduser.sh
Last active March 28, 2024 18:21 — forked from baniol/adduser.sh
Create a new user in macOS CLI.
#!/bin/bash
# =========================
# Add User OS X Interactive Command Line
# =========================
# http://superuser.com/questions/202814/what-is-an-equivalent-of-the-adduser-command-on-mac-os-x
getHiddenUserUid()
{
local __UIDS=$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ugr)