3 # @todo make the GID & UID of the user variable (we picked 2000 as it is the one used by default by Travis)
7 USERNAME="${1:-docker}"
9 addgroup --gid 2000 "${USERNAME}"
10 adduser --system --uid=2000 --gid=2000 --home "/home/${USERNAME}" --shell /bin/bash "${USERNAME}"
11 adduser "${USERNAME}" "${USERNAME}"
13 mkdir -p "/home/${USERNAME}/.ssh"
14 cp /etc/skel/.[!.]* "/home/${USERNAME}"
16 chown -R "${USERNAME}:${USERNAME}" "/home/${USERNAME}"
18 if [ -f /etc/sudoers ]; then
19 adduser "${USERNAME}" sudo
20 sed -i "\$ a ${USERNAME} ALL=\(ALL:ALL\) NOPASSWD: ALL" /etc/sudoers