implement NTLM dockerfile

This commit is contained in:
snowie2000 2025-01-07 18:35:27 +08:00
parent 372dc43ef2
commit 5aa29af1f6
5 changed files with 62 additions and 41 deletions

View file

@ -2,31 +2,9 @@
USER=rdpgw
file="/root/createusers.txt"
if [ -f $file ]
then
while IFS=: read -r username password is_sudo
do
echo "Username: $username, Password: **** , Sudo: $is_sudo"
if getent passwd "$username" > /dev/null 2>&1
then
echo "User Exists"
else
adduser -s /sbin/nologin "$username"
echo "$username:$password" | chpasswd
fi
done <"$file"
fi
cd /opt/rdpgw || exit 1
if [ -n "${RDPGW_SERVER__AUTHENTICATION}" ]; then
if [ "${RDPGW_SERVER__AUTHENTICATION}" = "local" ]; then
echo "Starting rdpgw-auth"
/opt/rdpgw/rdpgw-auth &
fi
fi
/opt/rdpgw/rdpgw-auth -n rdpgw -s /tmp/rdpgw-auth.sock &
# drop privileges and run the application
su -c /opt/rdpgw/rdpgw "${USER}" -- "$@" &