On Sun, Feb 03, 2008 at 02:07:05PM +0100, Treeve Jelbert wrote:
> Since the change of provider for su, I have noticed that one of my init
> scripts fails.
>
> The script does
> FB=/usr/firebird/bin/fbmgr.bin
> RUND=/var/run/firebird
> PID=$RUND/`basename $0`.pid
>
> echo "Starting Firebird Super Server"
> mkdir -p $RUND
> chown firebird:firebird $RUND
> su -l "firebird" -s /bin/sh -m \
> -c "$FB -start -forever -pidfile $PID"
> evaluate_retval
>
> The relevant entry in /etc/passwd is
> firebird:x:84:84::/var/run/firebird:/bin/false
>
> Any suggestions?
> It worked previously.
Treeve, have you been able to resolve this issue? I've noticed that the
shadow provided su resets the PATH environment variable to those
specified as ENV_SUPATH (for superuser) and ENV_PATH (for others) in
/etc/login.defs if those are not defined (which is the default case)
PATH is reset to /bin:/usr/bin. If $FB is a shell script that doesn't
set PATH or use absolute paths for binaries this might well be the
problem.