Skip to content

Instantly share code, notes, and snippets.

@jcf
Created December 29, 2008 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcf/41126 to your computer and use it in GitHub Desktop.
Save jcf/41126 to your computer and use it in GitHub Desktop.
Create an OS X user for secure PostgreSQL configuration
dscl . -create /Users/_pgsql
dscl . -append /Users/_pgsql RecordName pgsql
dscl . -create /Users/_pgsql UniqueID 80
dscl . -create /Users/_pgsql RealName 'PostgreSQL Server'
dscl . -create /Users/_pgsql UserShell /usr/bin/false
dscl . -create /Groups/_pgsql
dscl . -create /Groups/_pgsql PrimaryGroupID 80
dscl . -append /Groups/_pgsql RecordName pgsql
dscl . -create /Groups/_pgsql RealName 'PostgreSQL Users'
dscl . -create /Users/_pgsql PrimaryGroupID 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment