Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] su problem

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Treeve Jelbert <treeve AT scarlet.be>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] su problem
  • Date: Wed, 26 Mar 2008 18:02:33 +0100

On Wednesday 26 March 2008 12:18:23 Remko van der Vossen wrote:
> 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.
>

I found a fix for this.

The problem seems to be the -l parameter. I made it the the last one and the
problem disappeared. I updated the init scripts for firebird and postgresql
to
take account of this and both work for me now.

commits 2cbd610d87e8ef839a6b3c418a04f18934f246f8
and e7da4702a0a1ec4c5a546260b8b7eb6dd55973c5
on March 9th




> Regards,
>
> Remko van der Vossen


--
Regards, Treeve




Archive powered by MHonArc 2.6.24.

Top of Page