gitlabhq/gitlab-recipes — pull request #180 by mdirkse (2014-01-03 20:01:14+00:00)
Title: User with /sbin/nologin shell now also supported

The current code doesn't support users that have their shell set to `/sbin/nologin`, a widely used way to make absolutely sure that a particular user can never log in with a terminal.

Currently, the path is set by running a command as a user, but that command is run using the default shell and thus won't work for users with `/sbin/nologin` (ie with no shell).

Explicitly specifying a shell by adding `-s /bin/bash` (using the same shell used to run the init script) solves this problem.