I am playing with CouchDB and whenever I do, I first have to issue
sudo couchdb -i -u couchdb couchdb -b
This starts CouchDB as the user couchdb, group couchdb. I then also have to enter my password again (I am admin but still need to, when doing a sudo
) and all is fine.
How do I run CouchDB or anything similar at startup? Anytime anyone logs in, without any user interaction in OS X?
You want to check out writing a launchd plist for CouchDB.
Specifically, it has fields for UserName and GroupName which provide the functionality you're after.
Login scripts run with root permissions when anyone logs in. It would remove the need to use sudo.
http://support.apple.com/kb/HT2420