Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if auth-minimum-user-id is already set to zero on rootless #709

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/init_userconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ elif [ -z "$PASSWORD" ]; then
fi

if [ "${RUNROOTLESS}" = "true" ]; then
check_user_id=$(grep -F "auth-minimum-user-id" /etc/rstudio/rserver.conf)
if [[ -n $check_user_id ]]; then
check_user_id="$(grep -F auth-minimum-user-id /etc/rstudio/rserver.conf | sed -e 's/^.*= *//')"
if [[ "$check_user_id" = "0" ]]; then
echo "root user already authorized in /etc/rstudio/rserver.conf: $check_user_id, not changed"
elif [[ -n $check_user_id ]]; then
echo "minimum authorised user already exists in /etc/rstudio/rserver.conf: $check_user_id"
echo "RUNROOTLESS=true mode requires setting minimum authorised user to 0. Exiting"
exit 1
Expand Down
Loading