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:
/usr/sbin/in.telnetd (standard Netkit telnetd) or /usr/sbin/telnetd (such as GNU inetutils).-L /path/to/program option to specify a custom login program, whereas GNU inetutils uses -E /path/to/program. Check man telnetd on your system if you are unsure which implementation is installed.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.
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.
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.