can't run dcc with specific uid

Vernon Schryver
Wed Jul 13 13:19:37 UTC 2005

> From: =?ISO-8859-1?Q?Mat=EDas_L=F3pez_Bergero?= 

> >>I haved created an account for use with dccifd, but wen I startit from
> >>rc.DCC i got:
> >>This account is currently not available.

> > yes, give him a valid shell.

> That did the trick :)

Based on a related suggestion from Dean Hollister, rc scripts inn
the next version of the DCC source were going to always use a new
-I arg to tell the daemons to switch to a UID.  Then I got to
thinking about resource limits that can be set by `su -`.  So now
the plan is something like

    # try to use `su -` instead of -I to set limits
    if test ! -z "$DCCUID" -a X"$DCCUID" != X"$USER"; then
	if su - $DCCUID -c "$DCC_LIBEXEC/dccd $DCCD_ARGS" >/dev/null 2>&1; then
    eval $DCC_LIBEXEC/dccd $DCCD_ARGS

I am somewhat concerned about 

   - Is the ">/dev/null 2>&1" to stop complaints from `su` when it fails
       good or would it be better to see that noise?

   - do all versions of `su` have reasonable exit status?

Vernon Schryver

More information about the DCC mailing list

Contact by mail or use the form.