home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / linux / tips-for-redhat-4.2-sysadmins.txt < prev   
Text File  |  1998-03-13  |  25KB  |  504 lines

  1.    Notes on Red Hat 4.2 for Intel, by Rick Moen <rick@hugin.imat.com>
  2.                     Last updated:  13 Mar 1998
  3.  
  4.    This list is intended mostly for sysadmins new to Linux and Unix.
  5.    Much of it won't make sense, immediately.  However, print out and
  6.    review it later, for it _will_ make sense soon.
  7.  
  8.  
  9.  
  10.  
  11.    IMMEDIATE:
  12.  
  13. -- Start a "system log" of notes on significant system changes.  I use
  14.    a college-type composition book.  Start with your partition layout,
  15.    as shown by the /sbin/fdisk utility and the contents of /etc/fstab.
  16.  
  17. -- It's easiest to install _all_ of RH 4.2 (471 MB), and later remove
  18.    what you're sure you don't need.  Candidates (to remove):  inn, inews, 
  19.    inn-devel, MetroX, XFree86-100dpi-fonts, pcmcia-cs (unless it's a laptop), 
  20.    howto-translations, howto-dvi, umsdos-progs, gn (gopher server), kterm.
  21.    Remove redbaron if you're running 16 bits per pixel, since it works
  22.    only at 8 bpp or 32 bpp.  Remove all X servers other than the one
  23.    you use plus XFree86-VGA16 (the generic VGA server).
  24.  
  25. -- Apply RH updates (ftp://ftp.redhat.com/pub/redhat/redhat-4.2/updates/i386)
  26.    before making any other system changes.  These and other system 
  27.    upgrades are in many cases important for security.  There are known
  28.    serious security holes in many default RH 4.2 packages.  Read Linux-
  29.    security Web pages, for details.  Since you probably don't yet have
  30.    Internet access from Linux working, _if_ your machine can also run
  31.    some other OS (such as Windoze), use _it_ to download the upgrades,
  32.    then switch back to Linux, and move them to your Linux partition.
  33.    (If your machine doesn't dual-boot, this matter may have to wait.)
  34.  
  35. -- Installer lists existing Win95 partitions in /etc/fstab as type 
  36.    "msdos" (in error), unnecessarily precluding support for Win95 long 
  37.    filenames.  Remedy this problem by changing "msdos" to "vfat",
  38.    then remounting the Win95 filesystem(s).  You'll want to fix this
  39.    before, for example, moving upgrade RPMs from a Win95 partition
  40.    to a Linux one.  (When you recompile your kernel, don't forget to
  41.    include "vfat" filesystem support.)
  42.  
  43. -- Go through each /etc/rc.d/rc?.d/ directory and lower-case all 
  44.    symlinks of services you don't want to run.  Do this for both
  45.    S* and K* symlinks.  (I mean, turn "S" into "s" and "K" into "k".)
  46.    However, don't do this until _after_ you've installed all RH 4.2 
  47.    upgrade RPMs and removed unwanted RPMs.  For that matter, make 
  48.    _no_ other system changes (other than correcting /etc/fstab) until 
  49.    you've updated and removed RPMs.
  50.    To change a /etc/rc.d/rc?.d/ symlink's case, type (for example)
  51.       mv S62mars_nwe  S62mars_nwe
  52.    and left-arrow back to the second S62 to replace "S" with "s".
  53.    bash's filename-completion (e.g., "S62<tab>") will let you type the 
  54.    initial line quickly, and then you just correct one letter and
  55.    press return.  Note that symlinks disabled in this fashion sort 
  56.    to the bottom of "ls" outputs, are easy to re-enable, and 
  57.    self-document their on/off state.
  58.  
  59. -- Immediately after installation, "mv /tmp/install.log /root", or cron
  60.    will delete it.
  61.  
  62. -- Also immediately after installation, "find / -ls > /root/FILES.INSTALL &".
  63.    This is a snapshot of your installation files, including inode 
  64.    numbers.  Can make possible undeletion, later!
  65.  
  66. -- As root, run "symlinks -cr / > /root/badsymlinks.log &".  Read the log.
  67.    Correct or delete any dangling symlinks.  The "-c" parameter converts
  68.    absolute symlinks to relative (which is a good idea).
  69.  
  70. -- As root, run "/sbin/updatedb &", to create a starting file-location 
  71.    database for the ever-useful "locate" command.
  72.  
  73. -- All three of the preceding commands can be started from a single shell:
  74.    The ending "&" causes them to run in background.  Do not close the
  75.    shell from which they started, until they're reported their completion
  76.    back to your console screen (or you'll close the background tasks,
  77.    in closing your shell, because it's their parent process).
  78.  
  79. -- Create your own account (e.g., "adduser yourname") immediately, and
  80.    use it rather than the root login whenever possible.  You can always
  81.    type "su - " to open a root-account shell temporarily to do a
  82.    necessary task, then "ctrl-d" or "exit" to revert to being "you".
  83.    The root account is too powerful to use routinely, so cultivate
  84.    the habit of avoiding it, now.
  85.  
  86. -- For the same reason, don't spend time customising root's account, 
  87.    or making it comfortable.  If tempted to do that, you're using it
  88.    too much.
  89.  
  90.  
  91.  
  92.  
  93.    NEXT:
  94.  
  95. -- Read every file in /etc.  If you want to edit one, save the original
  96.    version first using "cp filename filename.INSTALL".  Visit subdirs, too.
  97.  
  98. -- To read text files without editing them, use the "more" or "less" utils.
  99.    "less" scrolls both ways.  "more's" display remains when you quit it.
  100.  
  101. -- For editing text files, if vi and emacs seem too much for a beginner,
  102.    try using simpler editors such as "joe" or "pico", for now.
  103.  
  104. -- Unless you bought Official Red Hat and selected the MetroX server,
  105.    you'll be using XFree86, and will require some effort to make it work
  106.    well.  XFree86's configuration file is /etc/X11/XF86Config, a text 
  107.    file.  Read it.  As you try to improve its contents, make backup 
  108.    copies, e.g. "/etc/X11/XF86Config.GOOD", in case you need to backtrack.
  109.    /usr/X11R6/bin/Xconfigurator may help, as may /usr/X11R6/bin/XF86Setup.
  110.    However, you should probably _read_ XF86Config, and adjust its contents
  111.    using a text editor such as vi, pico, jed, joe, etc.  The most 
  112.    important lines are HorizSync and VertRefresh, where you've declared 
  113.    your monitor's physical scanning-frequency limits -- safety limits 
  114.    that prevent X from sending any video mode outside its capabilities, 
  115.    which can damage it.  Those lines were created when you told the 
  116.    Red Hat installer what monitor you have, and their accuracy is of
  117.    vital importance.
  118.  
  119. -- To check/debug a new XF86Config file, try
  120.    "X > xerrors 2>&1"  (called "starting bare X")
  121.    Then kill the X server using Ctrl-Alt-Backspace, then read xerrors.
  122.    In subsequently re-editing XF86Config, you may want to comment out 
  123.    invalid "ModeLine" lines, font paths, etc.  You can get a guided tour
  124.    from the "XFree86 HOWTO" document, at the Linux Documentation Project
  125.    (see below), or in your own machine's Linux /usr/doc tree.
  126.  
  127. -- Let's be realistic about the X Window System, OK?  It was designed
  128.    to run at 1024x768, minimum, and 8-bit colour (256 shades), bare minimum.
  129.    Any lower resolution, and many X-based apps (e.g., Netscape) will 
  130.    have dialogues that extend off-screen, which is only partially fixable,
  131.    with much work.  Any fewer colours and you'll exhaust your colour 
  132.    palette every time you turn around.  In fact, you really want 16-bit 
  133.    colour (65536 shades).  24/32-bit colour (true colour) is nice, but
  134.    then your X server will take a huge amount of system RAM.  Thus, 
  135.    you'll need a video card with at least 2MB of RAM, and a monitor 
  136.    capable of 1024x768 at 60 Hz or higher vertical refresh.  (You really 
  137.    need a 17" monitor for adequate image size.)  Don't try to get by with 
  138.    less, and you'll be a lot happier in the long term.
  139.  
  140. -- Quick recipe for recompiling your kernel (which you _should_ do, ASAP):
  141.       rm /usr/src/linux   (a symlink)
  142.       Un-tar source to be off /usr/src.  (Will untar to /usr/src/linux.)
  143.       mv /usr/src/linux   /usr/src/linux-2.0.33   (for example)
  144.       ln -s /usr/src/linux-2.0.33  /usr/src/linux  (replace symlink)
  145.       cd /usr/src/linux
  146.       Open README in one window.  Open another to /usr/src/linux, too.
  147.       Follow instructions to re-create asm, linux, scsi (etc.) symlinks.
  148.       make mrproper
  149.       make config
  150.       make dep ; make clean
  151.       make zlilo > makelog 2>&1 &
  152.       Watch the compile process in "tail -f makelog"
  153.       mv /lib/modules/2.0.33 /lib/modules/2.0.33-old (if you run modules)
  154.       make modules   (if you run modules)
  155.       make modules_install   (if you run modules)
  156.       Edit /etc/lilo.conf to make sure it's the way you want it.
  157.       Make sure each kernel image in lilo.conf exists.
  158.       Run "sbin/lilo -v", to make sure there're no errors.
  159.       Reboot.
  160.    Note that Apache 1.2.4 and up requires System V IPC support in 
  161.    one's kernel.  So does Caldera's Looking Glass GUI-desktop app.
  162.  
  163. -- Make sure /etc/lilo.conf always has an additional stanza for a 
  164.    known-good, older kernel file, such as /vmlinuz-2.0.30.INSTALL.  
  165.    (Copy your installation kernel to that filename.)  Run "/sbin/lilo -v", 
  166.    to ensure that the older kernel is made usable.  Then, if a
  167.    new kernel doesn't work, you can still boot the older one.
  168.  
  169. -- System attempts to activate Appletalk and IPX-networking kernel modules 
  170.    at startup time, even if you never compiled such modules.  To 
  171.    prevent this, add the following to conf.modules:
  172.        alias net-pf-4 off  #Forget IPX
  173.        alias net-pf-5 off  #Forget AppleTalk
  174.  
  175. -- cd /usr/bin  ;  mv ftp ftp.INSTALL  ;  ln -s ncftp ftp
  176.    (ncftp is so much nicer.  Why not make it the default?
  177.    One possible answer why not:  Conceivably, you might run scripts
  178.    designed to invoke the default BSD-derived ftp client, which _might_
  179.    not work with ncftp.  However, I know of no such gotchas.)
  180.  
  181. -- Some other symlinks to consider (if they weren't created):
  182.       /dev/mouse  -->  /dev/cua0    (if it's on COM1)
  183.       /dev/modem  -->  /dev/cua1    (if it's on COM2)
  184.       /dev/cdrom  -->  /dev/scd0  or /dev/hdd  (or whatever device it is)
  185.  
  186. -- Edit /usr/lib/lynx.cfg, to change default opening page, and to
  187.    set "ADVANCED" mode (in which the current URL is displayed).
  188.    (If you upgraded lynx to a very recent version, lynx.cfg may be
  189.    in /etc, where it really belongs.)
  190.  
  191. -- Put a placeholder file named "NOTHING_IS_MOUNTED_HERE" in each
  192.    of your mountpoint directories.  It will be visible only when
  193.    nothing is mounted, there.
  194.  
  195. -- Renumber the symlinks in the /etc/rc.d/rc?.d directories (especially
  196.    rc3.d) to start the two "yp" scripts before cron, and (where
  197.    applicable) stop the two "yp" scripts after cron.  yp must start
  198.    first, or cron won't work.  This error is also in RH 5.0.
  199.  
  200. -- Edit /etc/rc.d/rc.sysinit to zero out /etc/rmtab exactly
  201.    the same way /etc/mtab is, at boot time.  This error is also
  202.    in RH 5.0.
  203.  
  204. -- /etc/cron.weekly/makewhatis.cron is broken:  Needs full path to
  205.    the "makewhatis" binary, /usr/sbin/makewhatis.
  206.  
  207. -- /usr/local/include directory doesn't exist.  Some packages
  208.    carelessly copy files to "/usr/local/include" without verifying 
  209.    the dir's existence.  Directory should be created, to compensate.
  210.  
  211.  
  212.  
  213.  
  214.    AFTER INITIAL SETUP:
  215.  
  216. -- You may want to establish dial-up modem access to the Internet:
  217.    You'll find _many_ recipes for this on Linux-oriented Web pages.
  218.    Read out and study a number of them, and then pick and implement one.
  219.    Several packages are in general use:  chat, dip, pppd, and diald.
  220.    (Personally, I think diald looks like a winner, but you should decide.)
  221.    http://sunsite.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html
  222.    http://www.interweft.com.au/other/rhtips/ppp/ppp-tip.html
  223.    http://sunsite.unc.edu/LDP/HOWTO/mini/Diald.html
  224.    http://www.loonie.net/~eschenk/diald.html
  225.    http://www-callug.cs.berkeley.edu/ppp/primer.html
  226.    http://www.cnw.com/~elarsen/linux/pppassis.html
  227.    http://users.hol.gr/~dbouras/
  228.    http://www.gaijin.com/linux/ppp.html
  229.    http://www.gslink.com/~mkb/linux/modem.html
  230.    http://sunsite.unc.edu/LDP/HOWTO/PPP-HOWTO.html, the PPP HOWTO, gives
  231.    _very_ extensive general information on the subject.
  232.    Generally, it goes something like this:
  233.       Make your modem dial your Internet service.  Log in.
  234.       Start PPP or SLIP on the far end (on your Internet service).
  235.       Start TCP/IP networking on your end (your Linux box).  Ping 127.0.0.1
  236.         and then "localhost" to make sure it works.
  237.       Configure your IP resolver (/etc/resolv.conf) for DNS nameservice.
  238.       Assign an IP (network) address to your modem device.
  239.       Set a default IP route out through your modem's IP address.
  240.       Verify Internet connectivity using ping, traceroute, etc.
  241.       Automate connection process using scripts, etc.
  242.    Doing the above _a step at a time_ (instead of hastening to drop in
  243.    some packaged, automated solution) makes debugging easier.
  244.  
  245. -- It doesn't hurt to have several nameserver entries in /etc/resolv.conf.
  246.  
  247. -- Netscape Navigator & Communicator for Linux are available and work
  248.    well, but tend to crash on Java apps in particular, because Netscape
  249.    linked them against an obsolete version of libc.  To render Netscape's
  250.    browsers rock-solid, use the simple fix technique described on the
  251.    Linux-Netscape Help Page, http://members.ping.at/theofilu/netscape.html.
  252.  
  253. -- To install a new RPM:  "rpm -iUv  foo.rpm"  Binary RPMs go wherever
  254.    the binaries are set to go; SRPMs (source-code RPMs) go to
  255.    /usr/src/redhat/SOURCES.
  256.  
  257. -- As you install either RPMs/SRPMs or ordinary tar.gz archives of
  258.    programs to your system, put the original compressed archive in
  259.    /usr/local/src/installed.  Put _candidates_ for installation in
  260.    /usr/local/src.  Consider archiving a copy of this tree on 
  261.    occasion to tape, or Zip disk, or wherever you can.
  262.  
  263. -- RPMs are a good way to get Linux running quickly.  However, their
  264.    convenience comes at the price of using code compiled against
  265.    someone else's libs, with the installed files going to someone
  266.    else's choice of directory locations -- and the quality of RPMs
  267.    varies wildly, with some important ones from Red Hat Software itself
  268.    (such as GNU tar) having known defects.  Therefore, consider weaning
  269.    yourself off them.  The first step is to use SRPMs (source-code RPMs
  270.    with filename extension ".src.rpm"), in place of the pre-compiled 
  271.    binaries in "regular" RPM packages (having extension "i386.rpm").
  272.    These unpack to /usr/src/redhat/SOURCES, where you'll find the 
  273.    standard ".tar.gz" source archive plus usually one or more ".patch"
  274.    files to make Red-Hat-specific modifications.  One applies the 
  275.    patches by unpacking the .tar.gz, entering the top of the package's
  276.    directory tree, then typing "patch < patchname.patch"  (where 
  277.    "patchname" is whatever).  Then, compile as directed by the INSTALL
  278.    or README* file(s).  When you're comfortable with this process,
  279.    you'll be able to compile almost any source archive, be able
  280.    to stay current with security fixes, and generally be better 
  281.    equipped to run a well-functioning system.
  282.  
  283. -- Most source archives, especially GNU ones, can be compiled like this:
  284.       Unpack.  Enter the top directory.  Read filename INSTALL or README*.
  285.       ./configure  (Figures out your system, composes a Makefile.)
  286.       Edit the resulting Makefile, to install to dirs you prefer.
  287.       make         (Does the actual compilation.)
  288.       make check   (You observe to see if it passes the tests.)
  289.       make install (Puts the binaries, etc., where Makefile says to.)
  290.    Any package that provides a "configure" script is probably a slam-dunk.
  291.  
  292. -- If you have to customise a package significantly in order to 
  293.    compile & install it, consider tar-gz-ing up (archiving and 
  294.    compressing for storage) the modified source tree for safekeeping.
  295.    E.g., since I put significant work into modifying the unpacked 
  296.    files from lynx-2.7.1-SSL.tar.gz, I stored the resulting tree 
  297.    separately as a lynx-2.7.1-SSL-hugin.tar.gz archive ("hugin" being 
  298.    my machine's hostname), and put that file in /usr/local/src/installed.
  299.  
  300. -- If you upgrade a package (or replace it from source code), watch
  301.    out that you may be putting new files in a different place, leaving
  302.    the old ones still present (e.g., /usr/local/bin vs. /usr/bin, 
  303.    /usr/local/lib vs. /usr/lib).  When I'm about to compile a replacement
  304.    from source code, I check for this gotcha by reading the Makefile's 
  305.    directive for "make install", then finding what it should "replace"
  306.    on my system using the locate command.  You can delete the originals, 
  307.    _or_ rename them to *.INSTALL and put in place of the original files 
  308.    symbolic links to the new locations.  The latter is the best approach,
  309.    in case some other program has hard-coded references to the original
  310.    file locations.
  311.  
  312. -- Check relevant error log(s) in /var/log any time you adjust or upgrade 
  313.    (and then restart) any daemon.  Always start daemons by invoking
  314.    their script files in /etc/rc.d with a "start" or "stop"
  315.    parameter.  E.g., "/etc/rc.d/init.d/httpd.init stop".
  316.    It's a bad habit to circumvent the /etc/rc.d scripts:  
  317.    Useful system maintenance (e.g., creation of lock files
  318.    under /var/lock) doesn't occur when you do that.
  319.  
  320. -- "ln -s" will use as default symlink name the filename of whatever 
  321.    you link to.  E.g., if tempted to type
  322.         ln -s /boot/vmlinuz-2.0.33 vmlinuz-2.0.33
  323.    you can accomplish the same thing with
  324.         ln -s /boot/vmlinuz-2.0.33
  325.  
  326. -- "cd -" will toggle back and forth between your current directory 
  327.    and the one you were in last.
  328.  
  329. -- To create a missing /dev file:
  330.       mknod -m <permissions> <devicename> <devtype> <major#> <minor#>, e.g.,
  331.       mknod -m 644 zero c 1 5
  332.  
  333. -- Resist the urge to upgrade libc to a later major version (e.g., 5.3.12
  334.    to 5.4.x), unless you don't mind forced upgrade of other components
  335.    such as ld.so, ncurses, gcc, libg++.
  336.  
  337. -- Note the symlink system in /usr/lib and /lib, for filenames starting
  338.    with the "lib" prefix.  Visual scrutiny sometimes reveals wrong
  339.    symlinks, or version-number symlinks it would be a good idea to 
  340.    provide.  Correct using "ln -sf  reallibraryfile.so.x  aliasname.so.y"
  341.    where x and y are version numbers.  Look in particular at libmenu.so.*,
  342.    libncurses.so.*, libform.so.*, libpanel.so.*, libhistory.so.*
  343.  
  344. -- run "ldconfig -v".  Note any cases of "sonames" not matching the
  345.    library names, e.g. libistory.so.2.0 having an "soname" of "readline.so.2".
  346.    If you upgrade ld.so (which you should -- the provided ld.so has a
  347.    big security hole), you'll need to fix.  Fix by mv'ing the library
  348.    to its soname, then putting a symlink as the name the library used to be.
  349.    Realign any symlinks that pointed to the old name, using "ln -sf ..."
  350.  
  351. -- /home doesn't contain just home directories:  httpd, ftp, gopher, samba.
  352.    In my view, those should be under /usr/local/etc.
  353.  
  354. -- If you move ftp's tree out of /home, edit ftp's home directory in
  355.    /etc/passwd, to match.
  356.  
  357. -- If you move httpd's tree out of /home, edit Apache's configuration
  358.    files in /etc/httpd/conf to match.
  359.  
  360. -- gopher and samba trees can also be moved out of /home, and you'll
  361.    have to find their configuration files and edit them to match.
  362.  
  363. -- One way to duplicate or move an entire filesystem (e.g., move "usr"):
  364.    "cd /mnt/newfilesystem  ;  dump 0f - /usr | restore xf -"  Remember
  365.    to "mkfs -t ext2 /dev/xxx", first (where xxx = sdb1, hdd1, etc.).
  366.    GNU tar can also do this trick, but the version shipped with RH 4.2
  367.    and prior often gets ownership wrong, when untarring.  Get the newest
  368.    source tree from ftp://ftp.gnu.org/, and recompile.  (GNU apps are
  369.    always easy to compile.  See description, above.)
  370.  
  371. -- "cpio" can also be used to move/duplicate entire filesystems.
  372.    Jim Dennis described how in an issue of Linux Gazette,
  373.     http://www.ssc.com/lg/issue22/lg_answer22.html#mvusr:  
  374.    "cd /usr && find . -print0 | cpio -p0vumd /mnt/newfilesystem"
  375.  
  376. -- Red Linux Gazette (URL above).  Subscribe to the (on-paper) magazine 
  377.    _Linux Journal_.  Buy and read Matt Welsh's book, _Running Linux_.
  378.    Visit the Linux Documentation Project at http://sunsite.unc.edu/LDP/,
  379.    and explore -- especially the HOWTO and mini-HOWTO documents.
  380.    Rummage through your own system's /usr/doc:  There are treasures in there!
  381.  
  382. -- Skim-read the File Hierarchy Standard (FHS -- formerly called File System
  383.    Standard, or "FSSTND"), to understand the the Linux directory tree's 
  384.    basic design logic.  It's somewhat obscured by backwards-compatibility 
  385.    (thus all the symlinks), and not always honoured, but nonetheless 
  386.    exists.  See http://www.pathname.com/fhs/.
  387.  
  388. -- Tired of having to confirm cp, rm, and mv command, when logged in
  389.    as root?  Comment out the aliases in "/root/.bashrc".
  390.  
  391. -- If not running kernel modules, comment out the roughly ten lines
  392.    in /etc/rc.d/rc.sysinit that invoke kerneld and depmod. 
  393.  
  394. -- lynx configuration file (lynx.cfg) is in /usr/lib, which is wrong.  
  395.    Should be in /etc.  Newest lynx RPMs relocate it.
  396.  
  397.  
  398.  
  399.  
  400.    POST-INSTALLATION SECURITY FIXES:
  401.  
  402. -- Default Apache configuration files are insecure, and benefit from 
  403.    rewriting.  See http://www.apache.org/docs/misc/security_tips.html.
  404.  
  405. -- Apache runs as user "nobody", group "nobody".  Should have its own
  406.    username/group to run as, such as httpd.  Add to passwd and group
  407.    files, then edit Apache's httpd.conf, to match.
  408.  
  409. -- To improve Apache security:
  410.        -- Allow CGI only in ScriptAlias directory, or other directories
  411.           not open to browsing by users.
  412.        -- Reconfigure Apache to run in chroot environment.  (How difficult
  413.           to implement?  Not sure.)
  414.        -- Use CGIWRAP.
  415.  
  416. -- Edit /etc/inetd.conf, to disable unwanted services by prepending
  417.    a "#" (comment) symbol to their definition lines.  Assume _all_
  418.    services to be unwanted until you have a reason to enable them.
  419.    If you need to offer a network service and have it disabled,
  420.    you'll figure it out with no difficulty -- so, when in any
  421.    doubt whatsoever, turn them off.  (If you end up commenting
  422.    everything out, disable the inet daemon by lower-casing its
  423.    S* and K* symlinks in /etc/rc.d/rc?.d, since it will have
  424.    no work to do.)
  425.  
  426. -- Unlike RH 5.0's, 4.2's sendmail is not protected against
  427.    abuse by spammers using it for relaying mail.  (See 
  428.    http://maps.vix.com/tsi/.)   Get sendmail-8.8.8-0.i386.rpm from
  429.    ftp.redhat.com, which incorporate's Claus Assmann's complete
  430.    set of anti-spam filters.  (See anti-spam links from 
  431.    http://www.sendmail.org/, for details.)  Suggested entries for
  432.    /etc/mail/deny are at http://www.sprocket.com/Security/SpamDomains.
  433.    However, the RPM (above) specifies some wrong return codes in 
  434.    /etc/sendmail.cf.  If you know what you're doing, fix sendmail.cf
  435.    as follows: 
  436.       501: sender hostname was invalid (no period in it)
  437.       550: returned if rejecting sender domain, IP address, hostname, or
  438.            to reject relaying
  439.       551: user moved ("redirect" result)
  440.       552: reject sender's particular e-mail address
  441.    Any time you put in a new sendmail, run "newaliases".  Check the
  442.    error log (/var/log/maillog), after restarting sendmail.
  443.  
  444. -- Sendmail includes restricted shell /usr/bin/smrsh.  chmod to 511.
  445.    Declare this as "Mailer Program" shell in /etc/sendmail.cf.
  446.    Be sure to create & populate /etc/smrsh with symlinks to programs
  447.    it's allowed to run, such as answer, fastmail, formail, mailto,
  448.    procmail, vacation, mail, burst, comp, dist, forw, inc, mhmail, send.
  449.  
  450. -- Consider xinetd instead of tcp-wrapper (AKA tcpd).
  451.  
  452. -- /usr/bin/dos (DOSemu) is 4755 (SUID).  Should be 755.
  453. -- /sbin/dump and /sbin/restore are 6755 (SUID/SGID).  Should be 755.
  454. -- /usr/X11R6/bin/seyon is 2755 (SGID).  Should be 755.
  455. -- /bin/mount and /bin/umount are 4755 (SUID).  Should be 755.
  456. -- /usr/bin/zgv is 4555 (SUID).  Should be 555.
  457. -- /var/lib/games/trojka.scores is world-writable and SUID.  Used by
  458.    RPM packages trojka and xtrojka.  Easy remedy:  Remove trojka/xtrojka.
  459.  
  460. -- ld.so is 1.7.4.  All versions before 1.9.3 had a buffer-overflow
  461.    security hole.
  462.  
  463. -- /sbin/request-route script had an inherent root-exploit security
  464.    hole.  (Remove or archive.)
  465.  
  466. -- Audit & protect system security using chkexploits, COPS, tiger, 
  467.    SATAN, tripwire.  Available at ftp://hugin.imat.com/pub/linux/security.
  468.  
  469. -- Some additional security resources:
  470.    http://www.redhat.com/linux-info/security/Linux-Security-FAQ/
  471.    http://www.replay.com/redhat/
  472.    http://www.caldera.com/tech-ref/security/
  473.    http://www.trouble.org/
  474.    http://www.rootshell.com/
  475.    ftp://ftp.iss.net/pub/faq/anonftp
  476.    http://www.deter.com/unix/
  477.    http://main.succeed.net/~bbuster/hacking/new/unixhack.txt
  478.    http://ssh.connectnet.com/
  479.    http://www.sans.org/
  480.    http://www.stokely.com/stokely/unix.sysadm.resources/dns.email.security.html
  481.    http://www.hilotek.com/Security/Security.html
  482.  
  483.  
  484.  
  485.  
  486.    WHY NOT RED HAT 5.0?
  487.    Strategic cowardice about libc version 6 compatibility.  Maybe soon, 
  488.    but you can always tell the pioneers by the arrows sticking out of 
  489.    their backs.  Prasanth Kumar <kumar1@home.com> has described the 
  490.    main problem succinctly:
  491.  
  492.    "...I'm not an expert at this but it is possible that when that program
  493.    was compiled they might have hard coded the path to that library
  494.    by giving the full pathname to gcc. It might have work for 99% of the
  495.    people since libc.5 is usually in /lib but now with libc.6 the problems
  496.    are cropping up. I know this is possible but don't know of any easy
  497.    way to test it...
  498.  
  499.    This is one of the general reasons I have back-reved from Redhat 5.0 to
  500.    4.2. It was too much trouble recompiling old apps which used to work.
  501.    I hope by the time 5.1 comes out most apps have been compiled to
  502.    libc.6."
  503.  
  504.