(Summary) Re: Changing the login message from telnetd

Michael H. Morse mmorse at z.nsf.gov
Wed Nov 21 05:00:01 AEST 1990


Thanks to all who responded to my question on how to change the login
message put out by telnetd.

The consensus is that the message is hardcoded into telnetd, so assuming
you don't have source, you need to patch the binary to change it (ugh).
This does not seem very Unix-y to me, but perhaps it has other origins.

The most specific instructions to patch this came from Kurt Schreiner.  I
haven't actually tried them, since the benefit didn't seem worth the
maintenance headaches, but here they are:

| 1. look for the string "SunOS" in in.telnetd in a hexdump, remember
|    the byte-number of the "S". (it's 0x42d0 in my copy of in.telnetd)
| 2. open in.telnetd for writing with adb (make a copy before to be save):
| 	adb -w in.telnetd
| 3. find "SunOS": it's in the datasegment, so the adb command
|    "<d+0x42d0?S" will bring you to the start of string "Sun..." and
|    print it.
| 4. with ".W? {something}" you'll overwrite the first 4 chars of
|    "SunOS...", where {something} can be everything you like, perhaps
|    some usefull characters (in hexadecimal representation of course!).
| 5. repeat 4. with the other bytes of "Sun...".
|    BUT BE ABSOLUTLY SHURE NOT TO WRITE MORE CHARS THAN HAD BEEN THERE
|    AND DON'T CHANGE THE TRAILING "null"-char OF "SunOS UNIX ("
| 6. if nothing has gone wrong, you will see the changed string the next
|    time logging in via telnet...
| 
| that's the hacky way, but that's li{f,v}e -- without sources....

Again, thanks to everybody that responded (and sorry it took so long to
get this summary out).

Michael Morse                           Internet: mmorse at note.nsf.gov
National Science Foundation               BITNET: mmorse at NSF
                                       Telephone: (202) 357-7659
                                             FAX: (202) 357-7663



More information about the Comp.sys.sun mailing list