Complete Active Directory teaching environment based on dockurr/windows: - Windows Server domain controller, Windows 11 client, Debian 12 client - docker-compose orchestration, env-driven configuration - Bilingual documentation (FR + EN) for students - Dual approach (GUI + PowerShell) in every procedure - Instructor course plan and reference scripts - RDP launcher scripts for Linux, macOS and Windows Made by AcadéNice - https://acadenice.fr/
31 lines
922 B
Bash
Executable file
31 lines
922 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Ouvre une session RDP sur le contrôleur de domaine (DC01).
|
|
# Fait par AcadéNice - https://acadenice.fr/
|
|
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
[ -f "$PROJECT_DIR/.env" ] && set -a && . "$PROJECT_DIR/.env" && set +a
|
|
|
|
HOST="127.0.0.1"
|
|
PORT="${DC_RDP_PORT:-3389}"
|
|
USER="Administrator"
|
|
DOMAIN="${AD_DOMAIN_NETBIOS:-CORP}"
|
|
PASSWORD="${AD_ADMIN_PASSWORD:-AdminP@ss!2026}"
|
|
SHARE_DIR="$PROJECT_DIR/shared"
|
|
SIZE="${RDP_SIZE:-1600x900}"
|
|
|
|
mkdir -p "$SHARE_DIR"
|
|
|
|
if command -v xfreerdp3 >/dev/null; then RDP=xfreerdp3
|
|
elif command -v xfreerdp >/dev/null; then RDP=xfreerdp
|
|
else
|
|
echo "xfreerdp non installé (apt install freerdp3-x11 / pacman -S freerdp / brew install freerdp)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec "$RDP" \
|
|
/v:"$HOST:$PORT" /u:"$USER" /d:"$DOMAIN" /p:"$PASSWORD" \
|
|
/cert:ignore +clipboard \
|
|
/size:"$SIZE" /dynamic-resolution \
|
|
/drive:shared,"$SHARE_DIR"
|