Skip to content

Commit b03a7ca

Browse files
authored
feat: use /bin/bash as the default shell (#1693)
* feat: use /bin/bash as the default shell * fix musllinux_1_1
1 parent 3ab9635 commit b03a7ca

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

docker/build_scripts/install-runtime-packages.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
105105
fi
106106
elif [ "${BASE_POLICY}" == "musllinux" ]; then
107107
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
108-
BASETOOLS="${BASETOOLS} curl util-linux tar"
108+
BASETOOLS="${BASETOOLS} curl util-linux shadow tar"
109109
PACKAGE_MANAGER=apk
110110
apk add --no-cache ca-certificates gnupg
111111
else
@@ -137,4 +137,17 @@ if [ "${BASE_POLICY}" == "manylinux" ]; then
137137
# c.f. https://github.com/pypa/manylinux/issues/1022
138138
echo "/usr/local/lib" > /etc/ld.so.conf.d/00-manylinux.conf
139139
ldconfig
140+
else
141+
if [ ! -f /etc/pam.d/chsh ]; then
142+
cat <<EOF > /etc/pam.d/chsh
143+
#%PAM-1.0
144+
auth sufficient pam_rootok.so
145+
auth sufficient pam_shells.so
146+
account required pam_permit.so
147+
password include base-password
148+
EOF
149+
fi
150+
# set the default shell to bash
151+
chsh -s /bin/bash root
152+
useradd -D -s /bin/bash
140153
fi

tests/run_tests.sh

+3
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,8 @@ if [ -L /usr/local/man ]; then
160160
test -d /usr/local/man
161161
fi
162162

163+
# check the default shell is /bin/bash
164+
test "$SHELL" = "/bin/bash"
165+
163166
# final report
164167
echo "run_tests successful!"

0 commit comments

Comments
 (0)