feat: install sudoers + allow sudo access for created users
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
84df38ba0d
commit
3c1c0ad41f
@ -5,6 +5,7 @@ RUN set -eux && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
openssh-server \
|
||||
sudo \
|
||||
locales \
|
||||
curl \
|
||||
telnet \
|
||||
|
1
setup.sh
1
setup.sh
@ -46,6 +46,7 @@ while [ "$USERADD" != "$i" ] ;do
|
||||
USER_SHELL=$j
|
||||
|
||||
useradd --home-dir "$BASE_DIR/$USER_NAME" --shell "$USER_SHELL" --uid "$USER_UID" --gid "$USER_GID" "$USER_NAME"
|
||||
echo "$USER_NAME ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/$USER_NAME"
|
||||
done
|
||||
|
||||
# HOSTKEYS="/var/lib/jumpbox/ssh_host_ed25519_key;/var/lib/jumpbox/ssh_host_rsa_key"
|
||||
|
Loading…
Reference in New Issue
Block a user