Subject: New FAQ: LINUX BBS

From: [email-masked]
Date: 30 Oct 1998 09:49:27 MET-1DST

Archive-name: Linux-BBS-FAQ
Version: $VER: Linux-BBS-FAQ v9811-0.02
Posting-Frequency: monthly
URL: http://www.telematique.org/ft/linuxbbs.htm

                    LINUX BBS FREQUENTLY ASKED QUESTIONS (FAQ)
                                      
                     Original author: Francois Thunus
                     Current maintainer: Francois Thunus
                                      
                              Nov98 - v0.02
                                      
   Welcome to the FAQ for Linux BBSing.
   Table of Contents is below.
   Questions and constructive comments are welcome.
   Send them to me at: 2:270/25.2 or [email-masked]
   
   _________________________________________________________________

Contents

          I.   DISCLAIMER
          II.  CREDITS
          III. COPYRIGHT
          IV.  FAQ UPDATES
          V.   WHERE CAN I GET THIS FAQ?

    1 - Using a ready-made package

         1.1 DayDream/Linux
         1.2 BBBS
         1.3 Sauron BBS
         1.4 FreeWorld BBS
         1.5 Falken
         1.6 Lora
         1.7 Synchronet

    2 - Making your own

         2.1 Introduction
         2.2 1BBS - One: Pablo
         2.3 1BBS - Two: Robert
     _________________________________________________________________
                                      
  I. DISCLAIMER
  
   This document is provided "as is" without any express or implied
   warranties. While every effort has been taken to ensure the accuracy
   of the information contained in this document, neither the authors, the
   maintainer or the contributors will assume responsibility for errors
   or omissions, or for damages resulting from the use of the information
   contained herein. This document is compiled in spare time for free,
   and I cannot check all of its contents. However,I am interested in
   making the FAQ as good as it can be, so your constructive feedback is
   welcome.
   
  II. CREDITS
  
   The original skeleton was based on my own LinuxFAQ and the contributions
   of several people from the LINUX fidonet echo.
   Insofar as possible, the name of the original contributor is listed
   alongside the contribution.
   
   If you have a question which is not answered in the actual FAQ, please
   Email it to me (Francois Thunus, see address at the top of this FAQ),
   otherwise if you want more information from one specific section of
   this FAQ, ask :-).
   
  III. COPYRIGHT
  
   I assert copyright on this document. I encourage you to distribute it
   widely, but only in its complete and original form and if you do not
   make any money out of it.
   
  IV. FAQ UPDATES
  
   For the time being, I (Francois) am the keeper of the FAQ. If you have
   comments or suggestions, corrections, or you have some information you
   want to see added or a request that I find some new answers, please
   let me know. Please contact me via the Email address at the top of the
   FAQ.
   
  V. WHERE CAN I GET THIS FAQ?
  
   You're reading it aren't you? SAVE it :-).
   If you don't have reliable Usenet access, you can also retrieve the
   FAQ by:

   File Request

       2:270/25    magic name : LinuxBBS

   FTP

       ftp://ftp.telematique.org/linuxbbs.faq
 
   WWW

      http://www.telematique.org/ft/linuxbbs.htm (Note that
        there is no "l" at the end of "htm", this is not a typo!)

        Please use the telematique site for any reference from your
        own web pages because it is under my direct control and easily
        changeable. It also contains links to numerous Linux resources.

     _________________________________________________________________
                                      
    1 - Using a ready-made package

         1.1 DayDream/Linux
          ported from AmigaOS. :) Totally free with sources
          Telnet/FTP/FidoNet-support.
          http://www.daydream.ml.org/

         1.2 BBBS
          telnet
          http://www.bbbs.net

         1.3 Sauron BBS
         (Jonathan Roberts)
          a telnetable BBS:  Sauron BBS has recently been ported to
          Linux (formerly DOS only). the author's web site is at
          http://members.tripod.com/~HortonS/

         1.4 FreeWorld BBS
         (J Kinsley)
          Its goal is to be the Ultimate Unix BBS, and completely free.
          http://www.FreeWorldBBS.ORG.
   
         1.5 Falken
         (Eric Kilfoil)
          Website: http://www.falkenbbs.com
          Alt: http://bbs.ipass.net/falken-mirror
          FTP: ftp://ftp.falkenbbs.com/pub/FalkenBBS/linux/FalkenBBS-current.tgz
          Author: Chris Whitacre
          Email: [email-masked]
          Support: telnet://falkenbbs.com

          Falken is the fastest growning BBS software package for
          Linux.  It unleashes the the best of BBS's and Internet
          capabilities. Unlike most Linux BBS systems, Falken
          provides an excellent user interface silimar to that
          found in traditional DOS based BBS packages.  It is
          packed with features.  For a list, visit
          http://www.falkenbbs.com/features

         1.6 Lora

         1.7 Synchronet
         (Jonathan Roberts)
          http://www.weedpuller.com/synchronet or ftp to that address.

   _________________________________________________________________

    2 - Making your own

         2.1 Introduction

          Most of the people who made their own BBS started on the basis
          of 1bbs, a free set of scripts available from sunsite.unc.edu.
          They then customized it. This is a very efficient way of doing
          this, because it uses all the built-in power of Linux and
          doesn't need third party utilities. Basically, any user
          logging into your computer is just a normal unix user. You
          define what they may or may not do.

         2.2 1BBS - One: Pablo Saratxaga

         My own BBS is a friendly shell script. I use a modified version
         of 1bbs, I cleaned it up and made it more flexible: menues are
         separate files, sourced on the spot which allows for
         multi-lingual config. I sat up a special user:

         bbs::600:105:BBS Guest:/home/bbs:/usr/local/bin/Menu

         For those who visit the bbs occasionally and don't want an
         account. Under "bbs", news and mail access are limited: news to
         read-only and mail to sysop only.
         I play on $PATH by having scripts of the same name as mail and
         news programs. It is not 100% secure, far from it, but since I
         never had any problem, I never pushed it further. Security
         holes are mostly in the possibility to abuse news/mail, and
         possibly to try and fill /tymp by uploading Encarta or
         something, but that can be plugged by using "quotas".

         2.3 1BBS - Two : Robert Heller

         My system is little more than a basic ifmail (ifcico +
         ifnews/ifmail/iftoss) / getty_ps, CNews, SMail, and 1bbs
         system.  I did some straight forward customizations to the 1bbs
         script.  Otherwise except for config files, things are pretty
         much just the basic as-distributed packages.   I expect to have
         lots of fun when I upgrade my system to Linux 2.x.x from my
         current 1.2.13: Inn and Sendmail are much more hairy beasts
         then CNews and SMail. My users have the normal UNIX user
         accesses.  BBS users are just normal UNIX users (in the
         /etc/passwd file).  I have a special user name 'new' which runs
         a captive script as root to create the account.

         Expert users can get themselves to a "normal" UNIX /bin/csh or
         /bin/sh shell if they want.  Newbies get the /bin/ash w/dialog
         script, which gives them something that has something of the
         the "look and feel" of a typical DOS BBS (like OPUS or
         Maximus).

         Multi-tasking and user authorization is done via normal UNIX
         utilities.  Access to EchoMail and local message areas is via
         standard UNIX newsreaders (I run CNews).  Private "mail" is
         just normal UNIX mail -- pine and elm are available. I don't
         bother with chat functionality, since I only have one line, but
         could be provided via UNIX's "talk" program.

         Ifmail contains two main things: ifcico, which is the FidoNet
         transport (i.e. it speaks FTS-0001, YooHoo/2U2, and EMSI), and
         ifmail/ifnews/iftoss, which handle gatewaying between FidoNet
         NetMail and EchoMail and UNIX's /var/spool/mail and
         /var/spool/news.  It also has programs for dealing with
         nodediffs and nodelists (ifpatch, ifindex).

         Also:  If all you want to do is run some program, say a tty
         game from your Linux bbs, you just fork it from the BBS.  If
         the BBS is implemented as a shell script, you add a dialog menu
         item.  Below are some excerpts from my standard /bin/ash /
         dialog script.

         If you have ever installed Linux using either RedHat Linux or
         the "color" install disk for Slackware, you seen and used
         dialog.  Both of these Linux installers are just bash scripts
         using dialog to present colorful menus and dialog boxes to the
         user.  Dialog can be used to create a GUI that is much like
         what one might have with an X11 app, but uses a character-based
         ANSI terminal.

         Playing various "glass tty" games:

Games ()
{ local EXIT
  EXIT="No"
  while [ "$EXIT" = "No" ]; do
   if dialog --title "Games in Textmode. Press CTRL-C to stop them!" --menu
"Select a Game:" 23 75 17 \
    Tetris "Character Based Tetris Version"\
    hang "Hangman. Very simple and classic Game"\
    Backgammon "Play Backgammon with the Computer"\
    Battlestar "Text based adventure Game"\
    Canfield "A modified version of Solitaire"\
    Cribbage "Card based classical Game of Cribbage"\
    Fish "Classical Childrens Card Game"\
    Monopoly "Monopoly Game"\
    Paranoia "A game based on questionaires"\
    Rain "Rain on your screen (Fast Modem required!)"\
    Sail "Adventure with old cannon boats"\
    Trek "Star Trek Game"\
    Worms "Need worms on your Screen?"\
    Wump "Hunt the Wumpus!" 2>$TMP; then
    case "`cat $TMP`" in
     Tetris) tetris ;;
     hang) hangman ;;
     Backgammon) backgammon ;;
     Battlestar) battlestar ;;
     Canfield) canfield ;;
     Cribbage) cribbage ;;
     Fish) fish ;;
     Monopoly) monop ;;
     Paranoia) paranoia ;;
     Rain) rain ;;
     Sail) sail ;;
     Trek) trek ;;
     Worms) worms ;;
     Wump) wump ;;
    esac
   else
    EXIT="Yes"
   fi
  done
}

Play glass tty empire:

CountryApplicationhelp ()
{ echo "\
Application for Empire Country
------------------------------

Applying for an Empire Country is easy.  You supply the 'diety' (the
sysop) with a name for the country you want to run and a password. 
When the 'diety' gets the application (as an e-mail message), the
'diety' will use his godly powers to create a base country  with the
specified name and password, complete with 2 sanctuary sectors.  Be
sure to read the Empire docs with the 'info' command ('info Guide' is a
good starting place). 
" >$TMP
  dialog --title "How to apply for an Empire Country" --textbox $TMP 20 79
}

ApplyCountry ()
{
  local EXIT
  local COUNTRY
  local PASSWORD
  EXIT="No"
  COUNTRY="?"
  PASSWORD="?"
  while [ "$EXIT" = "No" ]; do
    dialog --title "Application for Empire Country" --menu "Application for
Empire Country" 16 70 5 \
  1 "Information about the Application Process" \
  2 "Prefered Country Name: $COUNTRY" \
  3 "Country Password: $PASSWORD" \
  R "Apply with above Information" \
  X "No I do not want to apply for Membership" 2>$TMP
    if [ $? = 1 ]; then
      EXIT="Shell"
    elif [ $? -lt 0 ]; then
      EXIT="Logoff"
    else
      case "`cat $TMP`" in
  "X") EXIT="Leave" ;;
  "1") CountryApplicationhelp ;;
  "2") if dialog --title "Application for Empire Country" --inputbox "Please
enter your prefered country name here" 8 50 2>$TMP;
   then
     if /usr/bin/test -l "`cat $TMP`" -lt 7 ; then
       dialog --title "Application for Empire Country" --msgbox "The name is a 
little bit short. I expect at least 7 Characters!" 7 70
     else
       COUNTRY=`cat $TMP`
     fi
   fi ;;
  "3") if dialog --title "Application for Empire Country" --inputbox "Please
enter your country password here" 8 50 2>$TMP;
   then
     if /usr/bin/test -l "`cat $TMP`" -lt 4 ; then
       dialog --title "Application for Empire Country" --msgbox "The name is a 
little bit short. I expect at least 4 Characters!" 7 70
     else
       PASSWORD=`cat $TMP`
     fi
   fi ;;
  "R") if [ "$COUNTRY" = "?" ]; then
   dialog --title "Application for Empire Country" --msgbox "No Application
without a country name!" 7 50
       elif [ "$PASSWORD" = "?" ]; then
   dialog --title "Application for Empire Country" --msgbox "No Application
without a country password!" 7 50
       else
   echo -e "\
Application for an Empire Country
------------------------------------------------
Dear Robert Heller,
I hereby apply for an Empire Country.

Desired Country    : $COUNTRY
Password   : $PASSWORD

" >$TMP
   pico +8 -t -w $TMP
   if dialog --title "Application for Empire Country" --yesno "Send your
Application in?" 5 40; then
                   mail -s "Application for Empire Country" heller <$TMP
                   EXIT="Done"
                fi
             fi ;;
         esac
      fi
  done    
}

Empire ()
{ local EXIT
  EXIT="No"
  while [ "$EXIT" = "No" ]; do
    if dialog --title "Empire Choices" --menu "Empire Choices" 10 60 4 \
        P  "Play existing country"\
  A "Apply for a country" 2>$TMP; then
      case "`cat $TMP`" in
  "P") /usr/local/bin/emp_client
       EXIT="Yes" ;;
  "A") ApplyCountry 
       EXIT="Yes" ;;
      esac
     else
      EXIT="Yes"
     fi 
  done
}

The way a BBS works under UNIX (or Linux) is this: the BBS is just an
plain singer-user program that talks to stdin/stdout.  On my system, the
BBS is just a shell script using /bin/ash (a simplified Bourne Shell)
with the dialog program.  The modem is only messed with by the getty
program.  I use getty_ps.   getty_ps deals with autobaud and can be
configured to send the EMSI handshake and recognize the FTS-0001 and
YooHoo/2U2 hello bytes -- if it gets the EMSI, FTS-0001, or YooHoo/2U2 hello
message/bytes, it forks ifcico in "slave" (answer) mode, otherwise it
forks /bin/login.  /bin/login deals with asking for a username and a
password, checking these against /etc/passwd and forking a user shell. 
My BBS users get /bin/ash for their shell and the account creation
script drops a .profile that runs the BBS script.  A multi-line BBS
under UNIX simply means multiple getty processes running or different
/dev/tty?? lines.  An internet BBS just uses telnet via inetd.  Timed
events, such as scheduled poll events, house-cleaning, TIC processing, and
so on are handled by cron jobs.

A UNIX bbs is really far simpler than under DOS, since 90% of the work
a BBS program needs to do is handled by *standard utilities* that come
with UNIX: multi-tasker/multi-line support -- it is in the kernel, modem
handling -- getty, mail -- your choise of pine; elm; UCB mail; mh; emacs
Rmail, disscusion areas (EchoMail, whatever) -- tin; rn; nn; user
authorization -- /bin/login; /etc/passwd, and so on.