Mats,

2010/4/10  <matsg...@gmail.com>:
> ---------- Forwarded message ----------
> From: "Mats-Gxran Karlsen" <matsg...@gmail.com>
> To: misc@openbsd.org
> Date: Sat, 10 Apr 2010 12:38:25 +0200
> Subject: Execute startup script as <user>
> Hello.
>
> I'm running a headless OpenBSD server.
>
> I'm trying to create a startup script that executes the transmission-daemon
as
> a regular user.

[snip]

> /usr/bin/sudo -u $USERNAME -p $PASSWD $DAEMON -g $CONFIGDIR

I think there's your problem, -p $PASSWD doesn't make any sense, see man 1
sudo.

rc.local runs as root, root doesn't need to know the password for
$USERNAME in order to run as $USERNAME so just do

/usr/bin/sudo -u $USERNAME $DAEMON

Not sure what you're trying to achieve with -g $CONFIGDIR either,
again see man 1 sudo.

Cheers,
Damon

Reply via email to