#!/usr/bin/bash

set -e

nologin | grep "This account is currently not available"

# Password: hellothere
useradd --password '$y$j9T$ZLi71y6HSLZJfI4icrkue1$JJlJEL9y7BVuWYthlQ7tNiFMCXHKNlWZFOiz/PbRo/9' \
        --create-home \
        --shell /usr/bin/bash \
        obiwan

groupadd -f jedi

# Let obiwan not be a jedi when logging in, but get promoted after enough time to log in
(sleep 4 && usermod -aG jedi obiwan) &

expect ./debian/tests/login.exp
