Skip to content

Commit

Permalink
Tweak script description (#872)
Browse files Browse the repository at this point in the history
Improves readability
  • Loading branch information
salim-b authored Nov 7, 2024
1 parent e260441 commit 6416a0a
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions scripts/experimental/batch_user_creation.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
#!/bin/bash

# Batch creation of user accounts in RStudio Server. The script reads a list
# of username and password pairs from the `BATCH_USER_CREATION` environment
# variable and uses this information to update a group of existing users when
# the container starts. Each pair is of the format `username:password` and is
# separated from the next by a semicolon, with no intervening whitespace.
# Usernames may only be up to 32 characters long (required by `useradd`) and
# by default the supplied passwords must be in clear-text (later encrypted by
# `chpasswd`). If a username already exists, the script will deny that
# particular account creation request; otherwise, the user account will be
# created, the login shell set to Bash and the user's home directory created
# unless it already exists. By default, a group will be created for each new
# user with the same name as her username. If the groupname already exists,
# the script will deny the group creation request. If the password is not
# specified, it is assumed to be equal to the username. All users will also be
# added to the `staff` group (same as the default `rstudio` user). A directory
# called `.rstudio/monitored/user-settings/user-settings` is created in that
# user's home directory to store RStudio initial preferences. Users are not
# allowed to read other users' home directory.
# Batch creation of user accounts in RStudio Server
#
# This script reads a list of username and password pairs from the
# `BATCH_USER_CREATION` environment variable and uses this information to create
# or update user accounts when the container starts.
#
# Each pair is of the format `username:password` and is separated from the next
# one by a semicolon, with no intervening whitespace. Usernames may only be up
# to 32 characters long (required by `useradd`). By default, the supplied
# passwords must be in clear-text (later encrypted by `chpasswd`). If the
# password is not specified, it is assumed to be equal to the username.
#
# If a username already exists, the script will skip that particular account
# creation; otherwise, the user account will be created, the login shell set to
# Bash and the user's home directory created unless it already exists.
#
# By default, a group will be created for each new user with the same name as
# their username. If the groupname already exists, the script will skip the
# group creation. All users will also be added to the `staff` group (same as the
# default `rstudio` user).
#
# Finally, a directory called `.rstudio/monitored/user-settings/user-settings`
# is created in the user's home directory to store initial RStudio preferences.
#
# Users are not allowed to read other users' home directories.

set -e

Expand Down

0 comments on commit 6416a0a

Please sign in to comment.