aboutsummaryrefslogtreecommitdiff
path: root/docker/debian-dev/bootstrap/setup-user.bash
blob: f74dcdb9acca2fbd36029d15f59b9b8c9aac2761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /usr/bin/env bash

set -e

echo "Setting up user..."

echo "Installing sudo..."
apt-get install -y sudo
echo "Installing sudo done."

echo "Setting up sudo..."
sed -i.bak 's|%sudo[[:space:]]\+ALL=(ALL:ALL)[[:space:]]\+ALL|%sudo ALL=(ALL:ALL) NOPASSWD: ALL|' /etc/sudoers
echo "Setting up sudo done."

echo "Adding user $CRUPEST_DEBIAN_DEV_USER ..."
useradd -m -G sudo -s /usr/bin/bash "$CRUPEST_DEBIAN_DEV_USER"
echo "Adding user done."

echo "Setting up user done."