Created
June 19, 2024 10:26
-
-
Save NeoHBz/519fb4d8b7490be139a7e84b2a9fd646 to your computer and use it in GitHub Desktop.
MacOS: Create new user without homedir/login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dscl . -create /Users/unbound | |
sudo dscl . -create /Users/unbound UserShell /usr/bin/false | |
sudo dscl . -create /Users/unbound RealName "Unbound DNS User" | |
sudo dscl . -create /Users/unbound UniqueID "550" | |
sudo dscl . -create /Users/unbound PrimaryGroupID 20 | |
sudo dscl . -create /Users/unbound NFSHomeDirectory /var/empty | |
sudo dscl . -passwd /Users/unbound "password" | |
sudo dscl . -append /Groups/_developer GroupMembership unbound | |
# dscl . -list /Groups PrimaryGroupID | |
# 20 for staff (standard users) | |
# 80 for admin (administrators) | |
# 0 for wheel (superuser group) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment