Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.