diff --git a/images/fedora-remote/files/grd-firstboot b/images/fedora-remote/files/grd-firstboot index d6d6463..3c9d5fb 100755 --- a/images/fedora-remote/files/grd-firstboot +++ b/images/fedora-remote/files/grd-firstboot @@ -27,9 +27,12 @@ fi grdctl --system rdp set-tls-key "${TLS_DIR}/tls.key" grdctl --system rdp set-tls-cert "${TLS_DIR}/tls.crt" +# Pass username/password as arguments: grdctl's interactive prompt reads from a +# controlling terminal, which a system service does not have, so piping them in +# silently sets nothing (GRD then logs "Credentials are not set, denying client"). if [[ -n "${GRD_SYSTEM_PASSWORD:-}" ]]; then - printf '%s\n%s\n' "${GRD_SYSTEM_USER:-rdp}" "${GRD_SYSTEM_PASSWORD}" \ - | grdctl --system rdp set-credentials + grdctl --system rdp set-credentials \ + "${GRD_SYSTEM_USER:-rdp}" "${GRD_SYSTEM_PASSWORD}" fi grdctl --system rdp enable