***************************************************************************
		   Citadel/Davecode Sysop's Manual
***************************************************************************

To install Citadel/Davecode on your system:
	   1. Make a directory on your system for the bbs datafiles.
	      In general the source should be kept seperate.  Put the
	      pathname into sysconfig.h

	   2. Add a user "bbs" and a group "bbs" to /etc/passwd
	      and /etc/group.  Put the uid/gid in front.h

	   3. Make ~bbs/usr, and usr/bin, usr/lib, etc, and ~bbs/dev.
	      Run makedev std in ~bbs/dev.  The bbs runs under a
	      chroot so you will need to copy some system things into
	      various places in ~bbs/usr.  See lists of files below.
	      Make ~bbs/tmp, writable by bbs.

	   4. In ~bbs, make links:
		 bin@ -> usr/bin
		 etc@ -> usr/etc etc.
  
  	   5. Mkdir ~bbs/logs for the log files, and ~bbs/descs for
	      the room descriptions. Setup should do this but doesn't
	      yet.  Must be 'bbs' writable. 

	   6. Edit sysconfig.h to your liking.  It's commented pretty
	   well so you should be able to follow it.  Pay special
	   attention to the room size variables.

	   7. "make" will take care of citadel, and that's all.  I'm a
	   poor makefile writer.  Compile setup with "cc -o setup
	   setup.c".  All of the other utilities can be compiled this
	   way also, except for front (see below).

	   8. Run setup with all the options (-r -u -m)-- it will make
	   directories:	       structures, msgmains, rooms
           and datafiles:      usersupp, hashtab
	       All of these and all of the files in the directories
	       should be chown'ed to bbs. (chown -R bbs stuff...)

           9. Compile front. Front needs to be installed setuid root.
	   Make sure you edit the uid/gid in front.h.  

	   10. Copy the setuid front and the citadel executable to
	   ~bbs. 

	   11. mv front.* and tabooname into the ~bbs directory.  
		       
           12. If I didn't leave anything out, you're all set.
	   

LOCATIONS OF IMPORTANT FILES AND WHAT THEY DO

Files under BBSDIR:
      .hushlogin 	Prevents display of system wide motd on bbs login
      .nonew		Prohibit new users from logging in
      btmp		BBSWHO information storage struct
      citadel		The BBS executable
      eternal		Contains highest user number assigned by system
      front		The front shell of the bbs
      front.ALLOW	Contains an integer; # of users allowed on bbs login
      front.DOWN	If this file exists, prohibits bbs access;
			   contents of file are displayed then exits
      front.PROHIBE     Contains list of hostnames to prohibit access
			   Suggest using tcpd or the like for better control
      hashtab           Hash table of user entries
      quickroom		Contains room names and room type info
      tabooname		List of substrings that aren't allowed in usernames
      usersupp		user data
      
Directories under BBSDIR:
      bin	  	link to usr/bin; contains system binaries
      descs		Room description text; names= rm#    ex= rm4
      dev		ttys and other necessary devices for chroot
      etc		link to usr/etc
      logs		BBS calls, logins/outs, bad password attempt logs
      messages		Various citadel system text, files for easy editing
      msgmains		Room message struct files, msgmain.#
      rooms		Message #s per room and their location in msgmain
      structures	Lowest, highest msg # in room + current write pos.
      tmp		Location of temporary files (posts in progress &c)
      usr		Various system things, libraries, etc
      var		Link to usr/var

The following files/directories must be writable by uid 'bbs':
      btmp, eternal, hashtab, quickroom, usersupp
      descs, logs, msgmains, rooms, structures, tmp
Everything else should survive read-only as far as 'bbs' is concerned.

About the source:
A utility can be written to do just about any bbs system task
should it become necessary.  For instance to read/fix various
structs if one becomes corrupted.

I've been trying to keep configuration items or other things that
might need changing into the header files as follows:
      cctype.h	    replacement routines for brain-damaged ctype stuff
      citadel.h	    definitions of all Citadel structures.  DO NOT
		    CHANGE THINGS HERE AND RECOMPILE WITHOUT ALSO
		    MAKING SURE THE AFFECTED STRUCTS ARE RESIZED!!!!
      front.h	    Contains definitions of BBS UIDs
      hash.h	    Contains the bbs's hashing function.
      interr.h	    List of all the internal error text messages.
      sysconfig.h   System configuration options-- be careful if
		    you change things!

      
Important other files:
     Under BBSDIR/messages:
	   aideopt	Printed at command .A? and you're a full aide
	   changepw	At new user login and at .EP command	
	   entermsg	When entering message and user not expert
	   entopt	Printed at .E?
	   full		Printed when a user logs in and MAXUSERS reached
	   globalmotd	Displayed before messages/hello by front
	   goodbye	Printed at logout
	   hello	Printed just before querying for user name
	   help		? command output
	   motd		Printed after login and before Lobby. Users
				will only see this message ONCE.
	   newhelp      A new help template, if you like it.
	   newuser	Printed when a new user logs in
	   nonew	Message printed when disallowing new users
	   notvalid	Message printed if a new user is not automatically
				validated
	   prohib	Printed when users from site are prohibited
	   readopt	Printed at .R?
	   register	Printed when a user must register
	   rmaide	.A? when user is only a roomaide
	   sleeping	Message printed when user "sleeps"
	   valid	Message printed when user is automatically validated

	   
The file structure of ~bbs looks like this:

~bbs:
btmp           core@          front.ALLOW    quickroom      usersupp
chat*          eternal        front.PROHIBE  subsystem*
citadel*       front*         hashtab        tabooname

bin:
anykey*    csh*       findhost*  ls*        sed*       touch*
awk*       date*      finger*    lush*      sh*        true*
cat*       dbx*       hist/      mkdir*     sleep*     whoami*
cleanup*   dict*      history*   more*      stty*      wpwhois*
colrm*     egrep*     host*      nice*      tail*      zcat*
cp*        f@         kill*      rm*        telnet*    zmore*

descs:
rm0   rm14  rm2   rm26  rm34  rm44  rm51  rm58  rm63  rm70  rm78  rm87  rm97
rm1   rm15  rm21  rm27  rm37  rm46  rm52  rm59  rm65  rm72  rm79  rm88  rm98
rm10  rm16  rm22  rm29  rm38  rm47  rm53  rm6   rm67  rm73  rm8   rm9   rm99
rm11  rm17  rm23  rm3   rm39  rm48  rm55  rm60  rm68  rm74  rm83  rm94
rm12  rm18  rm24  rm31  rm4   rm5   rm56  rm61  rm69  rm75  rm84  rm95
rm13  rm19  rm25  rm33  rm40  rm50  rm57  rm62  rm7   rm76  rm86  rm96

dev:
console   ptyp5     ptyq0     ptyqb     ttyp2     ttypd     ttyq8     vme24
dump      ptyp6     ptyq1     ptyqc     ttyp3     ttype     ttyq9     vme24d16
kbd       ptyp7     ptyq2     ptyqd     ttyp4     ttypf     ttyqa     vme24d32
klog      ptyp8     ptyq3     ptyqe     ttyp5     ttyq0     ttyqb     vme32
nit       ptyp9     ptyq4     ptyqf     ttyp6     ttyq1     ttyqc     vme32d16
null      ptypa     ptyq5     ropc      ttyp7     ttyq2     ttyqd     vme32d32
ptyp0     ptypb     ptyq6     tty       ttyp8     ttyq3     ttyqe     zero
ptyp1     ptypc     ptyq7     ttya      ttyp9     ttyq4     ttyqf
ptyp2     ptypd     ptyq8     ttyb      ttypa     ttyq5     vme16
ptyp3     ptype     ptyq9     ttyp0     ttypb     ttyq6     vme16d16
ptyp4     ptypf     ptyqa     ttyp1     ttypc     ttyq7     vme16d32

etc:
group        passwd       resolv.conf  utmp
named.root*  profile      termcap

logs:
bbslog.112992  bbslog.120192  logins.113092  pwfail.112992  pwfail.120192
bbslog.113092  logins.112992  logins.120192  pwfail.113092

messages:
aideopt      full         hello.BAK    newhelp      prohibnew    sleeping
changepw     globalmotd   help         newuser      readopt      valid
entermsg     goodbye      help.BAK     nonew        register
entopt       goodbye.BAK  motd         notvalid     rmaide
errmsgs      hello        motd.BAK     prohib       roomaccess

msgmains:
msgmain.0   msgmain.24  msgmain.4   msgmain.55  msgmain.70  msgmain.86
msgmain.1   msgmain.25  msgmain.40  msgmain.56  msgmain.71  msgmain.87
msgmain.10  msgmain.26  msgmain.41  msgmain.57  msgmain.72  msgmain.88
msgmain.11  msgmain.27  msgmain.42  msgmain.58  msgmain.73  msgmain.89
msgmain.12  msgmain.28  msgmain.43  msgmain.59  msgmain.74  msgmain.9
msgmain.13  msgmain.29  msgmain.44  msgmain.6   msgmain.75  msgmain.90
msgmain.14  msgmain.3   msgmain.45  msgmain.60  msgmain.76  msgmain.91
msgmain.15  msgmain.30  msgmain.46  msgmain.61  msgmain.77  msgmain.92
msgmain.16  msgmain.31  msgmain.47  msgmain.62  msgmain.78  msgmain.93
msgmain.17  msgmain.32  msgmain.48  msgmain.63  msgmain.79  msgmain.94
msgmain.18  msgmain.33  msgmain.49  msgmain.64  msgmain.8   msgmain.95
msgmain.19  msgmain.34  msgmain.5   msgmain.65  msgmain.80  msgmain.96
msgmain.2   msgmain.35  msgmain.50  msgmain.66  msgmain.81  msgmain.97
msgmain.20  msgmain.36  msgmain.51  msgmain.67  msgmain.82  msgmain.98
msgmain.21  msgmain.37  msgmain.52  msgmain.68  msgmain.83  msgmain.99
msgmain.22  msgmain.38  msgmain.53  msgmain.69  msgmain.84
msgmain.23  msgmain.39  msgmain.54  msgmain.7   msgmain.85

rooms:
fullrm0   fullrm20  fullrm32  fullrm44  fullrm56  fullrm68  fullrm8   fullrm91
fullrm1   fullrm21  fullrm33  fullrm45  fullrm57  fullrm69  fullrm80  fullrm92
fullrm10  fullrm22  fullrm34  fullrm46  fullrm58  fullrm7   fullrm81  fullrm93
fullrm11  fullrm23  fullrm35  fullrm47  fullrm59  fullrm70  fullrm82  fullrm94
fullrm12  fullrm24  fullrm36  fullrm48  fullrm6   fullrm71  fullrm83  fullrm95
fullrm13  fullrm25  fullrm37  fullrm49  fullrm60  fullrm72  fullrm84  fullrm96
fullrm14  fullrm26  fullrm38  fullrm5   fullrm61  fullrm73  fullrm85  fullrm97
fullrm15  fullrm27  fullrm39  fullrm50  fullrm62  fullrm74  fullrm86  fullrm98
fullrm16  fullrm28  fullrm4   fullrm51  fullrm63  fullrm75  fullrm87  fullrm99
fullrm17  fullrm29  fullrm40  fullrm52  fullrm64  fullrm76  fullrm88
fullrm18  fullrm3   fullrm41  fullrm53  fullrm65  fullrm77  fullrm89
fullrm19  fullrm30  fullrm42  fullrm54  fullrm66  fullrm78  fullrm9
fullrm2   fullrm31  fullrm43  fullrm55  fullrm67  fullrm79  fullrm90

structures:
MMstructure.0   MMstructure.27  MMstructure.45  MMstructure.63  MMstructure.81
MMstructure.1   MMstructure.28  MMstructure.46  MMstructure.64  MMstructure.82
MMstructure.10  MMstructure.29  MMstructure.47  MMstructure.65  MMstructure.83
MMstructure.11  MMstructure.3   MMstructure.48  MMstructure.66  MMstructure.84
MMstructure.12  MMstructure.30  MMstructure.49  MMstructure.67  MMstructure.85
MMstructure.13  MMstructure.31  MMstructure.5   MMstructure.68  MMstructure.86
MMstructure.14  MMstructure.32  MMstructure.50  MMstructure.69  MMstructure.87
MMstructure.15  MMstructure.33  MMstructure.51  MMstructure.7   MMstructure.88
MMstructure.16  MMstructure.34  MMstructure.52  MMstructure.70  MMstructure.89
MMstructure.17  MMstructure.35  MMstructure.53  MMstructure.71  MMstructure.9
MMstructure.18  MMstructure.36  MMstructure.54  MMstructure.72  MMstructure.90
MMstructure.19  MMstructure.37  MMstructure.55  MMstructure.73  MMstructure.91
MMstructure.2   MMstructure.38  MMstructure.56  MMstructure.74  MMstructure.92
MMstructure.20  MMstructure.39  MMstructure.57  MMstructure.75  MMstructure.93
MMstructure.21  MMstructure.4   MMstructure.58  MMstructure.76  MMstructure.94
MMstructure.22  MMstructure.40  MMstructure.59  MMstructure.77  MMstructure.95
MMstructure.23  MMstructure.41  MMstructure.6   MMstructure.78  MMstructure.96
MMstructure.24  MMstructure.42  MMstructure.60  MMstructure.79  MMstructure.97
MMstructure.25  MMstructure.43  MMstructure.61  MMstructure.8   MMstructure.98
MMstructure.26  MMstructure.44  MMstructure.62  MMstructure.80  MMstructure.99

tmp:
cit13394        cit19875        cit22597        cit5694         cit8770
cit16035        cit21403        cit23562        cit5863         cit9618
cit16729        cit21451        cit25206        cit7601         usersupp.bak
cit18785        cit21816        cit29100        cit8007         usersupp.bak.Z
cit19643        cit22283        cit4387         cit8664

usr:
adm/    bin/    etc/    games/  lib/    share/  spool/  ucb/
