Signing in
From 1.4.6 every client signs in by default. A native install checks the desktop user's own system password through PAM; the Flatpak and the Snap use NLA with a password you set. This page covers both, the login screen the server draws, the limits on failed attempts, what a second connection does, and how to run with no sign-in when you want that.
The default for each install
| Install | Default sign-in | What the client sees |
| Native package (deb, rpm, AUR, Nix, Gentoo) | PAM: The desktop user's system password | A client with saved credentials goes straight in. Any other client gets a login screen drawn by the server |
| Flatpak, Snap | NLA: The desktop user's name and a password you set before the first start | The client's own credential prompt, before it connects |
Both are chosen by auth_method = "pam", the default in [security]. The
Flatpak and the Snap can't reach the system password from their sandbox, so there
"pam" means NLA, whether it comes from the default, a generated file or one written by
hand. The server never falls back to no sign-in.
PAM: The system password
With PAM, a client signs in with the desktop user's own account and password, the same ones used at the computer.
- Only the desktop's owner can sign in, the account the server runs as, whatever other accounts the system knows. On a host whose PAM consults a directory (sssd, winbind, LDAP), other directory users are refused.
- A client that sends its password (for example
xfreerdp /u:USER /p:PASS, or Windows Remote Desktop with a saved password) is signed in directly. - A client that sends none (Windows Remote Desktop without a saved password) gets the server's login screen. It sees nothing of the desktop until PAM accepts it.
- Nothing is stored. The server checks the password and forgets it.
- PAM works on native installs only, and it needs the PAM service file.
The PAM service file
Every 1.4.6 package installs /etc/pam.d/lamco-rdp-server. Without it PAM applies its
deny-all other policy and every sign-in fails, even with the right password; a native
install with no service file refuses to start. A build from source needs the file installed by
hand from packaging/pam/ in the source tree, which has one each for Debian and Ubuntu,
Fedora, openSUSE and Arch. The Debian file is:
@include common-auth
@include common-account
The server only authenticates the owner and checks the account: It opens no PAM session and
changes no passwords. The Fedora file uses password-auth, as sshd does, rather than
system-auth, whose fingerprint and smartcard modules would wait on a local reader.
The login screen
Windows Remote Desktop sends no password unless one is saved for the server, and expects the server to show its own logon screen. With PAM, a connection whose credentials are missing or rejected sees a login form drawn by the server:
- The server certificate's SHA-256 fingerprint is shown at the bottom, so you can compare it with the fingerprint in the client's certificate warning.
- One-time codes and expired passwords: Extra PAM prompts appear on the screen and are answered there.
- Typing follows the client's keyboard layout and its Num Lock and Caps Lock state.
- Until PAM accepts the owner, the client gets no desktop frames, cursor, clipboard, sound or microphone, and its keyboard and mouse reach only the form.
- Five failed attempts or three minutes without signing in close the connection, and the attempts count toward the sign-in limits below.
- A view-only server shows no form, since nobody could type into it: A client with saved credentials signs in, and one without is refused with the reason.
NLA: A password you set
NLA (Network Level Authentication, CredSSP) checks the client before the session starts, in the client's own credential prompt. The username is the desktop user's; the password is a separate one that you set and the server keeps in the secret store (Secret Service, TPM, or a machine-bound encrypted file), never in the config file.
Setting the NLA password
In the GUI: The Security tab has an NLA section that shows the username and whether a password is stored. Set it there.
From a terminal: The command reads the password without echo, or from stdin when stdin isn't a terminal, stores it and exits.
flatpak run --command=lamco-rdp-server io.lamco.rdp-server --set-nla-password
# Snap, or a native install
lamco-rdp-server --set-nla-password
# Remove the stored password
lamco-rdp-server --clear-nla-password
In the Flatpak and the Snap, the server refuses to start until a password is stored, and names
both ways to set it: "The server didn't start: Clients sign in with NLA as '<user>', but no
NLA password is stored". It refuses before any permission dialog is raised on the desktop. The
desktop's secret store has to exist first; see
First start of the Flatpak and Snap.
Setting the password with --set-nla-password and signing in with it was run on the
Flatpak (GNOME and KDE) and the Snap (Ubuntu 26.04) in the 1.4.6 release test.
NLA on a native install
A native install can use NLA in place of PAM. Put the username in
[security.credssp_credentials], store the password with --set-nla-password,
and set security_mode = "hybrid". With the default security_mode = "auto",
the server picks NLA by itself when credssp_credentials are set and
auth_method isn't "pam". The [security] section of the example
config (lamco-rdp-server --generate-config) describes each combination.
security_mode = "hybrid"
[security.credssp_credentials]
username = "your-user"
# domain = "" # optional; the password is in the secret store
A password line in credssp_credentials is still read, with a warning that
it sits in plain text. Move it to the secret store and delete the line.
Security modes
security.security_mode decides how the connection is protected and where credentials
arrive:
| Value | Meaning |
"auto" (default) | "hybrid" when credssp_credentials are configured and auth_method isn't "pam", "tls" otherwise |
"hybrid" | NLA (CredSSP) before the session |
"tls" | TLS only; credentials arrive in the Client Info PDU. PAM uses this |
"rdp" (alias "none") | Standard RDP Security with no TLS and no encryption. Only for Hyper-V Enhanced Session Mode over vsock, or loopback |
enable_nla is a legacy key: With security_mode = "auto",
enable_nla = true becomes "hybrid", and nothing else reads it. Set
security_mode instead. TLS certificates and Hyper-V are on the
Security page.
Limits on failed sign-ins
Failed sign-ins are counted for each address and each account name, so guessing spread over many addresses is held back too:
| Failures | Wait before the next attempt |
| 1 to 3 | None |
| 4th | 5 seconds |
| 5th | 15 seconds |
| 6th to 9th | 1 minute |
| 10th to 14th | 5 minutes |
| 15th and later | 15 minutes |
Failures are remembered for fifteen minutes. Fifty failures in a row, with no successful sign-in in between, disable sign-in for every client until the server is restarted: The log says so at error level, the login screen shows "Sign-in is disabled", and the GUI's Status tab shows "Running, sign-in disabled (restart to re-enable)". A successful sign-in resets the count.
Second connections
The server serves one session at a time. A second client that connects while one is connected:
| Sign-in | The second connection |
None (auth_method = "none") | Takes the desktop over; the first client is told why it was disconnected |
| NLA | Takes over once it has signed in; one that fails leaves the live session alone |
| PAM | Is refused at once, and the live session is left alone |
server.max_connections is read by nothing in this version.
Running with no sign-in
Set auth_method = "none" in [security]. Anyone who can reach the port can
then see and control your desktop, so use it only on a trusted network, behind a firewall, or with
the server listening on localhost. With no sign-in, server.desktop_session = "on-connect"
and the socket unit refuse to start on an address other machines can reach, because anyone could put
a permission dialog on the screen (exit status 78).
[security] can't be set from LAMCO_ environment variables, so a variable
can't turn sign-in off without a trace.
GNOME: Unlocking at sign-in
GNOME stops sharing while the screen is locked. With a sign-in configured, a client that signs in
unlocks the desktop (server.unlock_on_sign_in, on by default). After "Switch user", a
sign-in switches back to this desktop from the login screen, never from another person's session.
KDE, COSMIC and the wlroots desktops keep sharing through a lock, so the client sees the lock screen
and types the password there.
Troubleshooting
| Symptom | Cause | Fix |
| Every PAM sign-in fails with the right password | No /etc/pam.d/lamco-rdp-server | Install the package's file, or the one from packaging/pam/ for a source build |
| PAM refused at start, exit 78 | The service runs with no_new_privs, so unix_chkpwd can't check the password | Don't add sandboxing directives to the user unit; see Security |
| The Flatpak or Snap won't start: No NLA password is stored | NLA needs a password before the first start | Set it on the Security tab or with --set-nla-password |
| Windows Remote Desktop offers your Windows account and fails | It sends the Windows or Microsoft account first | Choose "More choices", then "Use a different account", and type the desktop user's name |
| The login screen says "Sign-in is disabled" | Fifty failures in a row | Restart the server |
| A directory user can't sign in | Only the desktop's owner can sign in with PAM | Sign in as the account the server runs as |