Skip to content

Instantly share code, notes, and snippets.

@shigeya
Created March 13, 2012 03:10
Show Gist options
  • Select an option

  • Save shigeya/2026339 to your computer and use it in GitHub Desktop.

Select an option

Save shigeya/2026339 to your computer and use it in GitHub Desktop.
Creating postgres user on Snow Leopard,
# Creating postgres user on Snow Leopard, same as Lion does.
# hint gotten: http://zanshin.net/2009/09/07/installing-postgresql-on-mac-10-6-snow-leopard/
/usr/sbin/dseditgroup -o create -i 216 -r "PostgreSQL Users" postgres
dscl . -create /Users/postgres
dscl . -create /Users/postgres UniqueID 216
dscl . -create /Users/postgres UserShell /bin/bash
dscl . -create /Users/postgres RealName "Postgres Administrator"
dscl . -create /Users/postgres NFSHomeDirectory /opt/local/share/postgresql84
dscl . -create /Users/postgres PrimaryGroupID 216
dscl . -create /Users/postgres Password Password
# Replace Password appropriately!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment