#!/bin/bash

set -euo pipefail

echo UID_MAX ${HOST_UID} >> /etc/login.defs

USER_HOME="/home/${HOST_USER}"

useradd -m -u ${HOST_UID} ${HOST_USER} -s /bin/bash
su ${HOST_USER} -m -c "HOME='$USER_HOME' PATH='$PATH' $*"
