How do I get Citadel to answer telnet connections directly, without first requiring users to enter a username on the host system?

When the standard telnet service is enabled on a Linux or Unix host, users who connect are presented with a system login: prompt asking for a local operating system account. To provide a seamless experience, you can configure your telnet daemon to run the Citadel client directly instead of /bin/login.

Note on daemon binaries and flags:

1. Using systemd

Modern Linux distributions can manage incoming telnet connections using systemd socket activation without requiring a separate superserver like inetd or xinetd.

Create the socket unit file at /etc/systemd/system/telnet.socket:

[Unit]
Description=Citadel Telnet Server Socket

[Socket]
ListenStream=23
Accept=yes

[Install]
WantedBy=sockets.target

Next, create the service template unit file at /etc/systemd/system/telnet@.service (the @ indicates an instantiated service template):

[Unit]
Description=Citadel Telnet Server Session
StandardInput=socket

[Service]
ExecStart=/usr/sbin/in.telnetd -h -L /usr/local/citadel/citadel

Reload systemd and enable the socket:

systemctl daemon-reload
systemctl enable --now telnet.socket

Note: Only enable and start telnet.socket. Do not attempt to start telnet@.service directly. Systemd will automatically spawn a new service instance for each connection that arrives on the socket.

2. Using xinetd

If your system uses xinetd, create or edit /etc/xinetd.d/telnet:

service telnet
{
    flags          = REUSE
    socket_type    = stream
    wait           = no
    user           = root
    server         = /usr/sbin/in.telnetd
    server_args    = -h -L /usr/local/citadel/citadel
    log_on_failure += USERID
}

Then reload or restart xinetd.

3. Using traditional inetd

If your system runs traditional inetd, edit /etc/inetd.conf and add or update the telnet entry:

telnet stream tcp4 nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/local/citadel/citadel
telnet stream tcp6 nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/local/citadel/citadel

Then reload inetd.