Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When installing PostgreSQL via MacPorts (and I assume via other means too), a postgres:postgres user/group is created. Are there any reasons why this user/group is needed?

share|improve this question
up vote 5 down vote accepted

The reason is that it is wise to run the database processes under a separate account. At least one advantage of this is that the OS processes as safer in the case of the database server being hacked. On the other side the database related files are safer from the 'normal' user accounts too - the PostgreSQL cluster (or at least its data) is relatively easy to destroy with a well-aimed single-file deletion.

If you check your passwd file you may find lots more similar users for other services, I imagine on similar grounds.

share|improve this answer
Thanks for the reply. I had a look at the passwd file and it contains lots of users that start with underscore. Actually the PostgreSQL and MySQL users also start with underscore (e.g. _mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false). Is there a specific reason for that? – drop-shadow Jul 17 '13 at 16:38
@drop-shadow This question may shed some light on it - basically the passwd file is not the place the user accounts are stored, still there are entries (at least for some) of them. – dezso Jul 17 '13 at 16:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.