I\'m writing an init script which is supposed to execute a single command as a user different than root. This is how I\'m doing it currently: sudo -u username comm
I usually do it the way that you are doing it (i.e. sudo -u username command). But, there is also the 'djb' way to run a daemon with privileges of another user. See: http://thedjbway.b0llix.net/daemontools/uidgid.html