rstudio/pam_script_auth.sh

13 lines
203 B
Bash
Executable File

#!/bin/bash
if [ -z "$PAM_USER" ]; then
echo "did not receive PAM_USER env var"
exit 1
fi
if ! id "$PAM_USER" &>/dev/null; then
adduser "$PAM_USER" --disabled-password --quiet --gecos ""
fi
exit 0