Add managed RustDesk enrollment for Linux clients
This commit is contained in:
@@ -20,6 +20,8 @@ COMPUTER_NAME=''
|
||||
ALLOW_GROUP=''
|
||||
ENABLE_SSH=false
|
||||
ENABLE_HYPERV_ENHANCED_SESSION=false
|
||||
ENABLE_RUSTDESK=true
|
||||
RUSTDESK_REGISTRATION_SHARE=''
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
@@ -41,6 +43,9 @@ Options:
|
||||
--enable-ssh Install, enable, and (when active) permit OpenSSH in the local firewall.
|
||||
--enable-hyperv-enhanced-session
|
||||
Install and configure XRDP over Hyper-V sockets for VMConnect.
|
||||
--disable-rustdesk Do not install the managed RustDesk remote-support client.
|
||||
--rustdesk-registration-share UNC
|
||||
Override the protected controller SMB enrollment share.
|
||||
--help Show this help.
|
||||
|
||||
Network safety:
|
||||
@@ -75,6 +80,8 @@ while (($#)); do
|
||||
--allow-group) ALLOW_GROUP=${2:?Missing value for --allow-group}; shift 2 ;;
|
||||
--enable-ssh) ENABLE_SSH=true; shift ;;
|
||||
--enable-hyperv-enhanced-session) ENABLE_HYPERV_ENHANCED_SESSION=true; shift ;;
|
||||
--disable-rustdesk) ENABLE_RUSTDESK=false; shift ;;
|
||||
--rustdesk-registration-share) RUSTDESK_REGISTRATION_SHARE=${2:?Missing value for --rustdesk-registration-share}; shift 2 ;;
|
||||
--help|-h) usage; exit 0 ;;
|
||||
*) fail "Unknown argument: $1. Use --help for usage." ;;
|
||||
esac
|
||||
@@ -236,15 +243,16 @@ configure_graphical_domain_login() {
|
||||
rm -f "$temporary_sssd_configuration"
|
||||
rm -f "${sssd_configuration_directory}/91-sgu-xrdp.conf"
|
||||
|
||||
# Slick Greeter normally shows only the last/local account tile. Expose a
|
||||
# manual user-name prompt so a first-time AD user can enter AL/AD/DO IDs.
|
||||
# Do not disclose a list of local/domain accounts at the console. Slick
|
||||
# Greeter still provides the explicit manual prompt needed for a first AD
|
||||
# sign-in (AL/AD/DO identifier and password).
|
||||
if [[ -d /etc/lightdm/lightdm.conf.d ]]; then
|
||||
local temporary_lightdm_configuration
|
||||
temporary_lightdm_configuration=$(mktemp)
|
||||
printf '%s\n' \
|
||||
'[Seat:*]' \
|
||||
'greeter-show-manual-login=true' \
|
||||
'greeter-hide-users=false' >"$temporary_lightdm_configuration"
|
||||
'greeter-hide-users=true' >"$temporary_lightdm_configuration"
|
||||
install -o root -g root -m 644 "$temporary_lightdm_configuration" \
|
||||
'/etc/lightdm/lightdm.conf.d/91-sgu-domain-login.conf'
|
||||
rm -f "$temporary_lightdm_configuration"
|
||||
@@ -397,6 +405,19 @@ EOF
|
||||
rm -f "$temporary_autostart"
|
||||
}
|
||||
|
||||
install_managed_rustdesk() {
|
||||
[[ $ENABLE_RUSTDESK == true ]] || return 0
|
||||
local installer="${SCRIPT_DIRECTORY}/Install-SguLinuxRustDeskClient.sh"
|
||||
if [[ ! -r $installer ]]; then
|
||||
fail 'The managed Linux RustDesk installer is missing from this bootstrap package.'
|
||||
fi
|
||||
local -a parameters=(--domain-name "$DOMAIN_NAME")
|
||||
if [[ -n $RUSTDESK_REGISTRATION_SHARE ]]; then
|
||||
parameters+=(--registration-share "$RUSTDESK_REGISTRATION_SHARE")
|
||||
fi
|
||||
bash "$installer" "${parameters[@]}"
|
||||
}
|
||||
|
||||
verify_domain_connectivity() {
|
||||
need_command getent
|
||||
getent ahostsv4 "$DOMAIN_CONTROLLER" >/dev/null || \
|
||||
@@ -446,6 +467,7 @@ fi
|
||||
enable_ssh
|
||||
configure_hyperv_enhanced_session
|
||||
install_welcome_wallpaper
|
||||
install_managed_rustdesk
|
||||
|
||||
printf '\nLinux enrollment completed.\n'
|
||||
printf ' Host: %s\n' "$HOST_FQDN"
|
||||
@@ -453,4 +475,7 @@ printf ' Domain: %s\n' "$DOMAIN_NAME"
|
||||
printf ' OU: %s\n' "$COMPUTER_OU"
|
||||
printf ' Login format: %%U@%s\n' "$DOMAIN_NAME"
|
||||
printf ' Welcome wallpaper: generated at each graphical sign-in when the desktop is supported.\n'
|
||||
if [[ $ENABLE_RUSTDESK == true ]]; then
|
||||
printf ' RustDesk: configured and registered in the controller inventory.\n'
|
||||
fi
|
||||
realm list
|
||||
|
||||
Reference in New Issue
Block a user