Issue 1711: gerrit initscript gerrit.sh depends on $GERRIT_USER having a a login shell
Status:  Released
Owner: ----
Closed:  Mar 2013
Reported by grel...@gmail.com, Dec 7, 2012
gerrit.sh uses su to invoke gerrit as $GERRIT_USER without specifying a shell; thus, if $GERRIT_USER's default shell is anything other than /bin/sh (or something compatible like bash), in particular if it's /sbin/nologin or /bin/false, the script will fail to launch gerrit.

Affected Version: 2.5

What steps will reproduce the problem?
1. Install Gerrit under a particular user, e.g. gerrit2
2. Set that user's shell to /sbin/nologin
3. use $GERRIT_HOME/review_site/bin/gerrit.sh start to launch gerrit

What is the expected output? What do you see instead?
Expected: Gerrit starts as usual
Actual: gerrit.sh exits with

FAILED
This account is currently not available.


I've attached a patch to explicitly specify the shell, which resolves this issue.
0001-Make-gerrit-initscript-specify-a-shell-when-using-su.patch
1.1 KB   View   Download
Jan 20, 2013
Project Member #1 david.pu...@sonymobile.com
Can you upload your patch for review on gerrit-review.googlesource.com?

Mar 28, 2013
#2 sop@google.com
(No comment was entered for this change.)
Status: WontFix
Mar 29, 2013
#3 grel...@gmail.com
This has already been merged into Gerrit master, see https://gerrit-review.googlesource.com/#/c/41540/

This bug should be closed as fixed.
Mar 31, 2013
Project Member #4 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Released
Labels: FixedIn-2.6