Some sysops may want to have their bbs load automatically when a user
telnets to port 23 on their system. With most distributions you
would simply telnet to the system and 'login' would take over and
prompt the user for the login name (bbs is the suggested name). With
this method the bbs login is seamless, the bbs will automagically
appear for the user without any extra steps. This is a quick and
dirty setup, we suggest that you do a little more reading as this may
not work on your system.
Step 1.
As root, go into /etc and edit inetd.conf, first add this line.
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetsnoopd
This will define the parameters for the telnet login which will utilize
the telnetsnoop feature in linux. Why telnet snoop is required is still
a mystery to the author... but, it works!
Next, you need to create a back door into your system if you want to
be able to log into your box normally via telnet without accessing the
bbs. To start this process, insert the following line into inetd.conf.
telnetbd stream tcp nowait root /usr/sbin/tcpd in.telnetd
Note the telnetbd at the beginning, this is the name of the service.
It doesn't have to be telnetbd, but its good to keep it close to
'telnet'.
The next file we will edit is /etc/services. This is where you put
the above definitions to work.
The first entry you need should already exist, so no need to change
that:
telnet 23/tcp
telnet 23/udp
Next is your back door service, place this near the end of the file
and put in the port number that you feel is most comfortable for you.
For the example below we are using port 2000.
telnetbd 2000/tcp
telnetbd 2000/udp
Next we need to configure ttysnoop to start up the bbs, we do this by
editing /etc/snooptab and putting the following line in. Note the
last entry in this line, this points to a script in your main mystic
directory.
* socket login /mbbs/runbbs
And finally we need to create the 'runbbs' script. This script will
load mystic and run any other commands you want to run when you run
the bbs. A simple example of this script is below:
#!/bin/sh
echo -e "\033(U"
login bbs TERM=linux
Line one is the tells the script to use sh as the shell. Line two
echo's the ansi enabling string as defined earlier in this document
and line three automatically logs the bbs user onto the system.
One final touch would be to create the .hushlogin semiphore file in
the bbs users home directory (as defined in /etc/passwd) by running
the following command:
touch .hushlogin
This file will force login to run quietly. Without it, it usually
would display your kernal version and any other important and
unsecure information to the user as they logged in.
This is all there is too it
