mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2025-08-17 05:53:50 +02:00
implement NTLM dockerfile
This commit is contained in:
parent
372dc43ef2
commit
5aa29af1f6
5 changed files with 62 additions and 41 deletions
|
@ -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}" -- "$@" &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue