On 3/10/2017 10:12 AM, Chris Hostetter wrote:
> If i understand correctly, you mean you've modified the init.d/solr
> script such that when "su" is run you pass "-s /bin/bash" ?

I do not think we can be absolutely certain that bash will *always* be
in that exact location.

Checked the bash source tarball, and it installs to /usr/local/bin by
default.  OS builders are modifying the install location.

It does appear that the service installer script hardcodes /bin/bash as
the solr user's shell when creating it.  That's probably a mistake, even
though it does appear to work for people.

If the shell of the user is /bin/sh (or /bin/sh is run by su), does
everything still work?  That exact binary is nearly guaranteed to be on
every POSIX system.  I would expect /bin/sh to work, because the shebang
of bin/solr and friends (where bashims are actually needed) is
"#!/usr/bin/env bash".  I notice that the shebang of the init script
itself points at /bin/sh.

Thanks,
Shawn

Reply via email to