dev-mate
This commit is contained in:
1 parent
15812c1c08
commit
1296b2a484
1 file changed
+12
-9
+12
-9
@@ -57,27 +57,30 @@ RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/debian.s
|
||||
dpkg-reconfigure -f noninteractive keyboard-configuration && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/packages.txt
|
||||
|
||||
# NEU: Systemweite statische Konfigurationen für LDAP/PAM/Sudo
|
||||
# 1. Entfernt die gefährliche %users Regel
|
||||
# 2. Sagt nsswitch, dass Sudoers auch im SSS (LDAP) gesucht werden sollen
|
||||
# 3. Aktiviert das automatische Erstellen von Home-Verzeichnissen (mkhomedir)
|
||||
RUN sed -i '/%users/s/^/# /' /etc/sudoers && \
|
||||
echo "sudoers: files sss" >> /etc/nsswitch.conf && \
|
||||
echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" >> /etc/pam.d/common-session
|
||||
|
||||
RUN chmod 440 /etc/sudoers && \
|
||||
mkdir -p /etc/sssd && chown root:root /etc/sssd && chmod 755 /etc/sssd && \
|
||||
mkdir -p /home && chmod 755 /home && \
|
||||
mkdir -p /home && chmod 777 /home && \
|
||||
chown xrdp:xrdp /etc/xrdp/key.pem /etc/xrdp/cert.pem /etc/xrdp/rsakeys.ini && \
|
||||
chmod 600 /etc/xrdp/key.pem /etc/xrdp/rsakeys.ini && \
|
||||
chmod 644 /etc/xrdp/cert.pem && \
|
||||
echo "LANG=${LANG}" >> /etc/environment && \
|
||||
echo "LANGUAGE=${LANGUAGE}" >> /etc/environment && \
|
||||
echo "LC_ALL=${LC_ALL}" >> /etc/environment && \
|
||||
sed -i '2i export LANG=${LANG}\nexport LANGUAGE=${LANGUAGE}\nexport LC_ALL=${LC_ALL}\npulseaudio --start\npactl load-module module-xrdp-sink.so\npactl load-module module-xrdp-source.so' /etc/xrdp/startwm.sh && \
|
||||
chmod +x /etc/xrdp/startwm.sh && \
|
||||
mkdir -p /etc/xdg/xfce4 && \
|
||||
echo "setxkbmap ${COUNTRY}" >> /etc/xdg/xfce4/xinitrc
|
||||
echo "#!/bin/sh" > /etc/xrdp/startwm.sh && \
|
||||
echo "export LANG=${LANG}" >> /etc/xrdp/startwm.sh && \
|
||||
echo "export LANGUAGE=${LANGUAGE}" >> /etc/xrdp/startwm.sh && \
|
||||
echo "export LC_ALL=${LC_ALL}" >> /etc/xrdp/startwm.sh && \
|
||||
echo "export XDG_SESSION_TYPE=x11" >> /etc/xrdp/startwm.sh && \
|
||||
echo "setxkbmap ${COUNTRY}" >> /etc/xrdp/startwm.sh && \
|
||||
echo "pulseaudio --start" >> /etc/xrdp/startwm.sh && \
|
||||
echo "pactl load-module module-xrdp-sink.so" >> /etc/xrdp/startwm.sh && \
|
||||
echo "pactl load-module module-xrdp-source.so" >> /etc/xrdp/startwm.sh && \
|
||||
echo "exec dbus-launch --exit-with-session mate-session" >> /etc/xrdp/startwm.sh && \
|
||||
chmod +x /etc/xrdp/startwm.sh
|
||||
|
||||
EXPOSE 3389
|
||||
|
||||
|
||||
Reference in new issue
Block a user