Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rdpgw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirror
Rdpgw
Commits
79f8d8f5
Commit
79f8d8f5
authored
1 year ago
by
Bolke de Bruin
Browse files
Options
Downloads
Patches
Plain Diff
Add local PAM docker-compose
parent
46620c87
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
dev/docker/Dockerfile
+4
-2
4 additions, 2 deletions
dev/docker/Dockerfile
dev/docker/rdpgw-pam
+3
-0
3 additions, 0 deletions
dev/docker/rdpgw-pam
dev/docker/run.sh
+27
-4
27 additions, 4 deletions
dev/docker/run.sh
with
34 additions
and
6 deletions
dev/docker/Dockerfile
+
4
−
2
View file @
79f8d8f5
...
@@ -35,13 +35,15 @@ RUN apk --no-cache add linux-pam musl
...
@@ -35,13 +35,15 @@ RUN apk --no-cache add linux-pam musl
# make tempdir in case filestore is used
# make tempdir in case filestore is used
ADD
tmp.tar /
ADD
tmp.tar /
USER
1001
COPY
--chown=0 rdpgw-pam /etc/pam.d/rdpgw
USER
1001
COPY
--chown=1001 run.sh run.sh
COPY
--chown=1001 run.sh run.sh
COPY
--chown=1001 --from=builder /opt/rdpgw /opt/rdpgw
COPY
--chown=1001 --from=builder /opt/rdpgw /opt/rdpgw
COPY
--chown=1001 --from=builder /etc/passwd /etc/passwd
COPY
--chown=1001 --from=builder /etc/passwd /etc/passwd
COPY
--chown=1001 --from=builder /etc/ssl/certs /etc/ssl/certs
COPY
--chown=1001 --from=builder /etc/ssl/certs /etc/ssl/certs
#COPY --chown=1001 rdpgw.yaml /opt/rdpgw/rdpgw.yaml
USER
0
WORKDIR
/opt/rdpgw
WORKDIR
/opt/rdpgw
ENTRYPOINT
["/bin/sh", "/run.sh"]
ENTRYPOINT
["/bin/sh", "/run.sh"]
This diff is collapsed.
Click to expand it.
dev/docker/rdpgw-pam
0 → 100644
+
3
−
0
View file @
79f8d8f5
# basic PAM configuration for rdpgw on Alpine
auth include base-auth
auth include base-account
This diff is collapsed.
Click to expand it.
dev/docker/run.sh
+
27
−
4
View file @
79f8d8f5
#!/bin/sh
#!/bin/sh
cd
/opt/rdpgw
||
exit
1
if
!
[
-e
/opt/rdpgw/rdpgw.yaml
]
;
then
USER
=
rdpgw
cp
/opt/rdpgw/rdpgw.yaml.default /opt/rdpgw/rdpgw.yaml
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
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 &
/opt/rdpgw/rdpgw-auth &
/opt/rdpgw/rdpgw &
fi
fi
# drop privileges and run the application
su
-c
/opt/rdpgw/rdpgw
${
USER
}
&
wait
wait
exit
$?
exit
$?
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment