Running BIND (DNS) as a non-root user

On Mac OS X Server 10.3.x the named daemon runs as root. I would like to change this so that named runs as a user (with out a shell). On other flavors of Unix, this typically involves using the "-u" flag when starting named. However, I am still getting familiar with the Mac command line, and how system daemons are started.

XServe G5 Mac OS X (10.3.9)

XServe G5, Mac OS X (10.3.9)

Posted on Mar 16, 2006 6:10 AM

Reply
3 replies

Mar 16, 2006 10:20 AM in response to enviromut

System services are handled by launchd.

If you look in /System/Library/LaunchDaemons/ you'll see a plist file for each service including org.isc.named.plist, the plist for named.

If you edit this file you'll see it's an XML document that describes the service and how the OS should handle it, including the part:

<key>ProgramArguments</key>
<array>
<string>/usr/sbin/named</string>
<string>-f</string>
</array>


Just append another entry in the array that says <string>-u nobody</string> (or whatever username you want to run as.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Running BIND (DNS) as a non-root user

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.