kc9udx It doesn't work right, but it works:
That's a bug. See PR# 58787
kc9udx It isn't any NetBSD client that can't login to that server, it's only certain ones. Those certain ones are all on one branch of my LAN, which makes me very suspicious.
A /etc/login.access lying around would do that, except:
NetBSD, by default, doesn't come with a /etc/login.access
Even if you had one in place, it would not have been read with -a valid because of PR# 58790.
And, even when you start telnetd with -a off (so that it is login which does auth./access ctl.), login does read that file, but, that wouldn't matter when we've replaced login with the script, above (nothing in that shell script reads that file!).
So, I dunno what's happening here.
Can you try the patch in PR# 58787 with this sra.c, then run both the server and failing client under script with the debugging options turned on?
You don't need to compile the whole system just libtelnet and telnetd will do. Assuming tools are in /usr/tools:
root# mkdir /tmp/obj
root# cd /usr/src/lib/libtelnet
root# make TOOLDIR=/usr/tools MAKEOBJDIRPREFIX=/tmp/obj MAKEVERBOSE=1 obj
root# make TOOLDIR=/usr/tools MAKEOBJDIRPREFIX=/tmp/obj MAKEVERBOSE=1
root# cd /usr/src/libexec/telnetd
root# make TOOLDIR=/usr/tools MAKEOBJDIRPREFIX=/tmp/obj MAKEVERBOSE=1 obj
root# make TOOLDIR=/usr/tools MAKEOBJDIRPREFIX=/tmp/obj MAKEVERBOSE=1
root# mv /usr/libexec/telnetd /usr/libexec/telnetd.orig
root# install -m 555 /tmp/obj/usr/src/libexec/telnetd/telnetd /usr/libexec/telnetd
Run the server as:
script -c '/usr/libexec/telnetd -a <off|valid> -debug -edebug -D options -D report -D netdata -D ptydata' /tmp/server.txt
Run the client as:
script -c 'telnet <server>' /tmp/client.txt
Email me both /tmp/*.txt files. (Remember to change your password, or to use a temp. user because the debug output'll have that.)
EDIT: Are you passing the -U flag to telnetd? (might cause problems for clients with no valid hostnames)