Skip to content

Commit d0c4ef6

Browse files
authored
Specify /bin/bash as the tinypilot user's shell (#1261)
Without a shell specified, the user defaults to /usr/sbin/nologin, which prevents us from executing commands as the tinypilot user through sudo su. I tested this on a clean install of Raspbian Buster Lite, and it fixes the `sudo su` issue. Fixes #1260 <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1261"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a>
1 parent f902ccb commit d0c4ef6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

debian-pkg/debian/tinypilot.postinst

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ getent group "${TINYPILOT_GROUP}" > /dev/null || \
2121
# adduser is idempotent, so we don't need to check existence first.
2222
adduser \
2323
--system \
24+
`# We have to specify a shell to override the default /usr/sbin/nologin, ` \
25+
`# which prevents us from executing commands through "sudo su".` \
26+
--shell /bin/bash \
2427
--ingroup "${TINYPILOT_GROUP}" \
2528
--home "${TINYPILOT_HOME_DIR}" \
2629
"${TINYPILOT_USER}"

0 commit comments

Comments
 (0)