UNIX System Administration Handbook

Evi Nemeth, Garth Snyder, Scott Seebass

Publisher: Prentice Hall, 1989, 593 pages

ISBN: 0-13-933441-6

Keywords: System Administration

Last modified: June 13, 2021, 3:02 p.m.

The UNIX System Administration Handbook is an attempt to condense everything that a system administrator should know about UNIX® into a single, easy-to-use volume. Topics are organized in the sequence that they are likely to be employed. It can be used as a tutorial and as a reference book.

The authors emphasize the rationale behind the UNIX® system and present a hands-on approach. The authors encourage all tasks to be done right the first time. They also provide a detailed understanding of why each system administration task is important.

  1. Where to Start
    1. Notation and conventions used in this book
    2. Typical duties of the system administrator
      1. Adding and removing users
      2. Adding and removing hardware
      3. Performing backups
      4. Installing new software
      5. Day-to-day activities
      6. Troubleshooting
      7. Maintaining local documentation
      8. Fixing bugs
      9. Security
      10. Helping users
      11. System accounting
    3. The UNIX manuals
    4. The UNIX philosophy
  2. Booting and Shutting Down
    1. Bootstrapping
      1. The bootstrapping process
        1. Steps in the boot process
        2. Loading UNIX
        3. Initialization of the kernel
        4. Hardware probing and configuration
        5. Creation of spontaneous system processes
        6. Operator intervention (single-user boot only)
        7. Execution of initialization scripts
        8. Multi-user operation
      2. A closer look at the /etc/rc* scripts
        1. A sample /etc/rc script
        2. A sample /etc/rc.local script
      3. What to do if the system won't boot
        1. Hardware problems
        2. Defective boot floppies or tapes
        3. Damaged filesystems
        4. Improperly configured kernels
        5. Errors in the /etc/rc* scripts
    2. Shutting down and rebooting
      1. Methods of shutting down and rebooting
      2. Turning off the power
      3. Using the shutdown command
      4. Using the halt command (BSD)
      5. Using the reboot command (BSD)
      6. Sending init a TERM signal
      7. Using the fasthalt and fastboot commands (BSD)
      8. Killing init
  3. Superuser Privileges
    1. Ownership
      1. Ownership of files
      2. Ownership of processes
      3. Changing ownership of processes
    2. The superuser
    3. The root password
    4. Choosing the root password
    5. Becoming root
      1. sudo — a limited su
    6. Restrictions on the use of root
    7. Other important users
      1. daemon: an owner of unprivileged software
      2. bin: an owner of system commands
      3. sys: owner of the kernel and memory images
  4. The Filesystem
    1. What the user sees
      1. Filesystems
    2. System organization
    3. Types of files
      1. Regular files
      2. Directories
      3. Character and block device files
      4. UNIX domain sockets (BSD)
      5. Named pipes (ATT)
      6. Hard links
      7. Symbolic links (BSD)
    4. File permissions
      1. The setuid and setgid bits
      2. The sticky bit
      3. The permission bits
      4. Changing permissions
      5. Assigning default permissions
    5. Inodes
    6. Keeping track offilesystems (BSD only)
      1. The /etc/fstab file
    7. Swapping and paging
    8. Filesystem integrity
      1. Filesystem checking under BSD
      2. Filesystem checking under ATT
  5. Controlling Processes
    1. Introduction
    2. What is a process?
    3. Attributes of processes
      1. PID
      2. PPID
      3. UID and EUID
      4. GID and EGID
      5. Priority
      6. Control terminal
    4. The secret life of processes
    5. Monitoring processes — the ps command
    6. Signals
    7. Process states
    8. BSD process groups and job control
    9. Sending signals — the kill command
      1. csh kill
    10. Setting priority: nice and renice
      1. ATT nice
      2. BSD nice
      3. BSD renice
      4. ATT nohup
    11. Errant processes
  6. Adding New Users
    1. Adding users
      1. Edit the /etc/passwd file
        1. Login name
        2. Encrypted password
        3. UID number
        4. Default GID number
        5. GCOS field
        6. Home directory
        7. Login shell
      2. Make the home directory
      3. Edit the /etc/group file
      4. Copy the startup files
      5. Set an initial password
      6. Set up ingres database access file
      7. Set the mail home
      8. Record accounting information
      9. Update the user database and phone book
      10. Verify the new login
      11. NFS and the yellow pages
      12. Pyramid variations: ATT or BSD universe
      13. Setting quotas (BSD only)
    2. Removing users
    3. User management
      1. Pseudo-logins
      2. Organizing users on the disk
      3. Disabling logins
      4. Password aging
    4. Random facts and folklore
      1. Editor autoconfiguration
      2. Password ordering
      3. The nobody login
  7. Devices and Drivers
    1. Device files and their relationship to drivers
    2. Naming conventions for devices
    3. Installing new hardware
      1. Strapping options
      2. Device categories
      3. Installing a known device
      4. Installing a brand-new device
        1. Acquire a device driver
        2. Declare the device
        3. Let the config command know about the device
        4. Install the object files
        5. Edit the SYS/machine-type/conf.c file
        6. Make the device files in /dev
        7. Install the hardware as for the known devices
    4. Specifics per machine
      1. Vaxen
      2. Pyramids
      3. Suns
      4. HP Bobcats
      5. IBM RT's under AIX
    5. Testing and debugging
  8. Configuring the Kernel
    1. An overview of the kernel
    2. Your role in building the kernel
      1. Binary versus source
    3. When to configure the kernel
      1. The initial kernel
      2. Adding device drivers
      3. Tuning table sizes
    4. Configuring and building the BSD kernel
      1. A scenic tour of the kernel construction site
      2. The kernel construction process
      3. Audit your system's hardware
      4. Build the kernel's configuration file in SYS/conf
        1. The machine keyword
        2. The cpu keyword
        3. The ident keyword
        4. The timezone keyword
        5. The maxusers keyword
        6. The options keyword
        7. The config keyword
        8. The controller, tape, disk, and device keywords
        9. The pseudo-device keyword
        10. A sample configuration file
      5. Create the kernel's control directory in SYS
      6. Run config from the conf directory
      7. Run make depend in the compilation directory
      8. make the kernel
      9. Install the new kernel
      10. Test and debug the new kernel
      11. Document the new kernel
    5. Modifying the kernel with adb
    6. Adding a totally new device to the kernel
    7. Configuring the ATT kernel
      1. Edit the kernel Makefile
      2. The description file
      3. Running config
      4. Making the new kernel
      5. Installing and testing the new kernel
  9. Installing Terminals
    1. Wiring design
    2. Cables
      1. Soft carrier and hard carrier
      2. Cable and connector types
    3. The login process
    4. Terminal configuration files
      1. BSD files: /etc/ttys, /etc/ttytype, /etc/gettytab
      2. ATT files: /etc/inittab, /etc/gettydefs, /etc/gettytab
    5. Terminal support: the termcap/terminfo database
    6. Specific steps in installing a terminal
    7. Modems
      1. Protocols
      2. Line turnaround
      3. Auto-dialers
      4. BSD Configuration files: /etc/phones and /etc/remote
    8. Debugging
      1. Breakout box
      2. Fake logins
      3. Modem speaker
    9. Setting the terminal modes
      1. Special characters and the terminal driver
      2. The stty command
      3. The tset command (BSD)
      4. Resetting the terminal
  10. Printing under ATT
    1. Introduction
    2. Destinations and classes
    3. A brief description of lp
      1. Setting up lp
    4. The lpsched and lpshut commands
    5. The Ipadmin command
    6. The cancel command
    7. The accept and reject commands
    8. The enable and disable commands
    9. The lpmove command
    10. The lpstat command
    11. Interface programs
  11. Printing under BSD
    1. An overview of the printing process
    2. The /etc/printcap file
      1. Printcap variables
        1. File and directory specifications
        2. Remote access information
        3. Printing filters
        4. Communication settings
        5. Local mode bits
        6. Page information
        7. Miscellaneous printcap variables
      2. A sample /etc/printcap entry
    3. Controlling the printing environment
      1. The lpq command — view the printing queue
      2. The lprm command — remove jobs
      3. The lpc command — make administrative changes
    4. Printer philosophy
      1. On a network, put only one printer on each machine
      2. Use file size limits appropriately
      3. Use printer accounting
      4. Use burst pages only when necessary
      5. Provide recycling bins
  12. Adding a Disk
    1. Introduction
    2. The hardware
      1. Disk controllers
        1. SMD family
        2. SCSI family
      2. Disk drives
        1. Removable media drives
        2. Winchester drives
        3. WORM drives
        4. Solid state disk
    3. Disk geometry
    4. Formatting the disk drive
    5. Partitions
      1. /etc/disktab file
      2. Disk labels
      3. Partition layout
      4. Filesystems
    6. Device entries for disks
    7. Partitioning decisions
      1. Separation
      2. Sizes reflect dump/backup strategy
      3. Consistency
      4. Swap and paging areas
    8. Building filesystems
    9. The tunefs command (BSD only)
    10. Brand-new disk in a box
      1. Unpacking
      2. Locking heads
      3. Strapping options
      4. Formatting the drive
        1. Handling bad blocks (BSD)
        2. Handling bad blocks (ATT)
      5. Hook it up
      6. Partitioning
      7. Add the device to kernel
      8. Make /dev entries
      9. Reboot the new kernel
      10. Make filesystems on the partitions
      11. Add partitions to /etc/fstab
      12. Use it or lose it
    11. Debugging
  13. Hardware Maintenance Tips
    1. Board handling lore
      1. Static
      2. Installing a board
      3. Reseating instructions
    2. Preventive maintenance
    3. Third-party or manufacturer's maintenance contracts
    4. Typical maintenance call scenario
      1. On-site maintenance
      2. Board exchange maintenance
    5. Manufacturer's warranties
    6. Computer room environment
      1. Power
      2. Temperature
      3. Humidity
      4. Vibration
  14. Networking under BSD
    1. Introduction
      1. The ISO/OSI-network model
      2. The Internet
      3. Documentation
    2. Ethernet hardware
      1. Versions
      2. Limits and sizes
      3. Ethernet components
        1. Physical media: the network cable
        2. Ethernet hardware: terminators, connectors, adapters
        3. Transceivers and taps
        4. Multipart transceivers
        5. Drop cables
        6. Connecting and expanding Ethernets
        7. Ethernet parts, tools, limits, and sizes
    3. Hardware installation
      1. The network cable
        1. Handling the cable
        2. Routing the cable
        3. The actual cable installation
        4. Attaching connectors
        5. Grounding the cable
      2. Attaching transceivers
        1. Intrusive type
        2. Vampire type
        3. Internal type
      3. Drop cables
      4. Installing the interface board
    4. Network software
      1. Names
      2. Ethernet addresses
      3. IP addresses
      4. Requesting an IP address
      5. Name-to-IP address mappings
      6. Routing
      7. Routing protocols
      8. Subnets
      9. ARP — the Address Resolution Protocol
      10. Trailers
      11. TCP/IP differences
    5. Required software
      1. Choose and assign names
      2. Set up the /etc/hosts file
      3. Set up the /etc/networks file
      4. Building a new kernel
        1. Device drivers supported
        2. Configure a networking kernel
      5. Set up the /etc/rc.local file
        1. The ifconfig command
        2. Routing
      6. Set up terminal interactions
        1. Pseudo-terminal devices
        2. Terminal configuration files
      7. Set up the /etc/hosts.equiv and /.rhosts files
      8. Boot the new kernel
      9. Test drive the network, gently
      10. Make links in /usr/hosts
      11. Start the rwhod daemon
      12. The inetd daemon
        1. The /etc/inetd.conf file
        2. The /etc/services file
        3. The /etc/protocols file
      13. Network commands
        1. telnet(1) and rlogin(1)
        2. ftp(1) and rcp(1)
        3. rtar(l), rmt(l), and rdd(l)
        4. rdump(8) and rrestore(8)
        5. rdist(1)
      14. Loose ends
    6. Designing the network
      1. Issues
        1. Network architecture versus building architecture
        2. Existing networks
        3. Expansion
        4. Congestion
        5. Maintenance
      2. Documentation
    7. Management issues
      1. Global control
        1. Network design
        2. The backbone cable
        3. Host IP addresses, hostnames, and subdomain names
        4. Protocols
        5. Routing
      2. Maintenance and financing
      3. Software licensing
      4. Network security
      5. Local technical issues
        1. Global versus local copies
        2. Tools
        3. Communication and documentation
    8. NFS — the Network File System
      1. The mount command
      2. RPC, the remote procedure call interface
      3. XDR, external data representation
      4. YP, the Yellow Pages
        1. YP files
        2. YP programs
        3. YP setup 284
    9. Optional software
      1. BIND: the Berkeley Internet Name Domain server
        1. BIND configuration files
        2. named.boot — master server startup
        3. named.boot — secondary server startup
        4. named.local — client startup
        5. named.ca — initial cache
      2. Anonymous ftp
        1. Taking via anonymous ftp
        2. Giving via anonymous ftp
    10. Debugging and monitoring the network
      1. Hardware
        1. Time domain reflectometer
        2. Network analyzer
      2. Software
        1. ping
        2. netstat
        3. ruptime and rwho
        4. routed and gated
        5. telnet and ftp
        6. Sun's traffic program
  15. Mail and Berkeley Sendmail
    1. The electronic mail explosion
      1. Mail systems
        1. User agent
        2. The transport agent
      2. Mail addressing
      3. Reading mail headers
      4. Spool directory
      5. Startup files
    2. sendmail
      1. Documentation
      2. Mail philosophy
        1. Master mail machine
        2. Mail home
      3. Aliases
    3. The sendmail configuration file
      1. General syntax
      2. Defining variables
        1. D: define symbol
        2. C : define a class from a list
        3. F : define a class from a file
        4. O: set options, a google of'em
        5. P: message precedence
        6. T : trusted users
        7. H : header format
      3. Rewriting rules
        1. Rulesets
        2. Tokens
        3. Rules
      4. Mailers
      5. Parameters
    4. Testing and debugging
      1. Testing rewriting rules
      2. Debug levels in sendmail
      3. The -v flag to mail
      4. Talk to SMTP directly
    5. Security
  16. Uucp
    1. An overview of uucp
    2. Flavors of uucp
    3. Uucp addresses
    4. Uucp data transport — the uucico program
    5. User-level uucp
      1. The uucp command
      2. The uusend command
      3. The uux command
    6. Setting up uucp
      1. Initial uucp configuration
        1. Locate the uucp software
        2. Create the uucp login
        3. Connect your modems
        4. Describe your modems to uucp
        5. Edit your USERFILE and L.cmds files
        6. Establish low-cost telephone service
        7. Enter telephone access codes in the L-dialcodes file
        8. Establish an initial connection
        9. Reconfigure your mail system to use uucp
        10. Smart mailers
        11. Test uucp mail
        12. Publish your uucp data
      2. Adding a new neighbor
        1. Make a login for the new connection
        2. Make an entry in L.sys for the new connection
        3. Debug the uucp connection
        4. Edit /usr/lib/crontab to control the calling schedule
        5. Publish the new connection in the uucp maps
    7. The uucp log files
      1. The /usr/spool/uucp/LOGFILE file
      2. The /usr/spool/uucp/SYSLOG file
      3. The /usr/spool/uucp/ERRLOG file
    8. Miscellaneous uucp support programs and files
      1. The uuclean command
      2. The uuq command
      3. The uuname command
      4. The uuencode and uudecode commands
      5. The uupoll command
      6. The uusnap command
      7. The uulog command
      8. The /usr/lib/uucp/L.aliases file
  17. News
    1. Distribution
    2. Newsgroups
    3. The news software
    4. Maintenance strategies
    5. News-reading chores for system administrators
      1. news.announce.important (moderated)
      2. news.software.b
      3. news.sysadmin
      4. comp.unix.questions
      5. comp.unix.wizards
      6. comp.sources.unix (moderated)
      7. comp.sources.games (moderated)
      8. comp.sources.machine and comp.binaries.machine (moderated)
      9. comp.sources.misc (moderated)
      10. comp.sources.bugs
      11. comp.sources.wanled
      12. comp.sys.machine and comp.sys.machine.digest (moderated)
      13. comp.mail.maps (moderated)
  18. Backups and Transportable Media
    1. Why backups are essential
    2. Which filesystems to backup, and when
    3. Backup devices and media
      1. Floppy diskettes
      2. Videotape
      3. Cartridge tapes
      4. Nine-track magnetic tapes
      5. Exabyte cartridge tapes
      6. WORM disks
    4. Setting up an incremental dumping regime
      1. The dump command
        1. Dump level
        2. The u flag
        3. The dump device
        4. Other options to dump
      2. The Towers of Hanoi sequence
      3. Different dump schedules
      4. Cleaning tape drives
      5. Preparing to do dumps
      6. Level 0 and 1 dumps
      7. Level 2 to 9 dumps
      8. Dumping over a network
      9. Dumping to disk
    5. Restoring from dumps
      1. Restoring individual files
      2. Interactive restore
      3. Restoring entire filesystems
      4. Dumping and restoring to change system software
    6. Other archiving programs
      1. The tar command
      2. The cpio command
      3. The dd command
      4. The volcopy command
    7. Incremental backups without dump
  19. Accounting
    1. Introduction
    2. Why bother with accounting?
    3. What to measure and archive
    4. Outline of a complete accounting system
    5. Simple accounting systems
    6. Accounting in a networked environment
    7. Accounting under BSD
      1. CPU accounting
      2. Connect time accounting
      3. Disk usage
      4. Printer usage
      5. Dial-out usage
      6. Summaries
      7. Archiving log files
    8. Accounting under ATT
      1. Setting up accounting
      2. What accounting does
  20. Daemons
    1. Introduction
    2. Daemons common to ATT and BSD
      1. init
      2. cron
    3. The BSD daemons
      1. pagedaemon
      2. swapper
      3. update
      4. lpd
      5. sendmail
    4. ATT daemons
      1. errdaemon
      2. lpsched
      3. Internet daemons
      4. inetd
      5. comsat
      6. talkd
      7. rwhod
      8. ftpd
      9. rexecd
      10. rlogind
      11. rshd
      12. timed
      13. routed
      14. gated
      15. syslogd
      16. named
      17. nntpd
  21. Periodic Processes
    1. cron — the UNIX timekeeper
    2. cron's configuration files
      1. BSD configuration files
      2. ATT configuration files
      3. Format of the configuration files
    3. Some common uses for cron
      1. Running user-scheduled scripts
      2. Processing user appointment calendars (BSD)
      3. Cleaning the filesystem
      4. Uucp polling
      5. Accounting
      6. Setting the system time
      7. Marking time
      8. Network distribution of mail aliases (BSD)
  22. Quotas and OS Limits
    1. Introduction
    2. The quota system (BSD)
      1. Installing quotas
        1. Reconfigure the kernel
        2. Modify the /etc/rc script
        3. Modify the partition's /etc/fstab entry
        4. Create the quota control file
        5. Run the quotacheck program
        6. Turn quotas on by hand
      2. Miscellaneous quota commands
    3. Per-process limits
      1. BSD process limits
      2. ATT process limits
    4. The tout program
  23. Monitoring the System
    1. Introduction
    2. Monitoring system activity
      1. System statistics
      2. The iostat command
      3. The vmstat command
      4. The pstat command
      5. The netstat command
    3. Maximizing system throughput
      1. ps
      2. Reading .cshrc in csh scripts
      3. grep, egrep, fgrep, and other pattern matching programs
  24. Security
    1. Introduction
    2. Security problems in the /etc/passwd file
      1. Password checking, aging, and selection
      2. /etc/passwd entries with zero UID
      3. User shells
    3. Setuid programs
      1. Writing setuid programs
        1. Don't write setuid shell scripts (for any shell)
        2. Don't use library routines which invoke a shell
        3. Don't use execlp or execvp
        4. Use full pathnames to identify files
        5. Don't setuid to root unless you need to
        6. Use seteuid(2) to control setuid powers
        7. Don't make setuid programs worldreadable
        8. Don't put secret back-door escapes in your code
      2. Finding setuid programs 44
    4. Trojan horses
    5. at and cron
    6. Important file permissions
    7. Smart terminal problems
    8. Data encryption with crypt
    9. Vigilance
  25. Small UNIX Systems
    1. A few caveats on choosing a system
    2. Performance
  26. Bunch o' Stuff
    1. Local documentation
      1. Methods of documentation
      2. Wire maps
      3. Cable specifications
      4. Maintenance logs
      5. Boot instructions
      6. Backup schedules
      7. Vendor information
      8. Local customs
    2. /etc/motd
    3. make
    4. File revision handling
    5. Data compression
    6. Local software
    7. Bugs
      1. Bug fixes
      2. Reporting bugs
    8. Disk cleanup
      1. Partition sizes
      2. BSD disk quotas
      3. Peer pressure with easy archiving
      4. Skulker scripts
      5. Disk overflows
    9. UNIX user groups
  1. The sudo command
    1. Introduction
    2. The sudo.c file
      1. The clrusr.c file
    3. The Makefile file
    4. The sudo.8 file
  2. An adduser script
    1. Introduction
    2. An adduser script
  3. An rmuser script
    1. Introduction
    2. An rmuser script
  4. Sample startup files
    1. Introduction
    2. A sample .login file
    3. A sample .cshrc file
    4. A sample .profile
    5. A sample .mailrc
  5. tout: A voluntary timeout program
    1. Introduction
    2. The Makefile file
    3. The tout.c file
    4. The tout.1 file
  6. The dumdum script
    1. Introduction
    2. The dumdum script
  7. The lostfile script
    1. Introduction
    2. The lostfile script
  8. Makefile.localsys
    1. Introduction
    2. A Makefile.localsys file
  9. The spacegripe script
    1. Introduction
    2. The spacegripe script
  10. A sendmail configuration file
    1. Introduction
    2. A master sendmail.cf file
  11. Uucp site registration instructions
    1. Introduction
    2. Specific field descriptions
      1. System name (#N)
      2. Machine type and operating system (#S)
      3. Organization name (#O)
      4. Contact person (#C)
      5. Email address of contact person (#E)
      6. Contact person's telephone number (#T)
      7. Organization's address (#P)
      8. Latitude and longitude (#L)
      9. Remarks (#R)
      10. Netnews neighbors (#U)
      11. Last edit of entry and when (#W)
      12. pathalias data
        1. Local area networks
    3. What to do with your entry
  12. Domain name registration form
    1. Introduction
    2. The domain registration form
  13. Internet IP address request form
    1. Introduction
    2. IP address request form
  14. The remote utility
    1. Introduction
    2. The remote.c file
  15. Distributed host management system
    1. Introduction
    2. The updatehosts.c file
    3. The Makefile file
    4. The updatehosts.l manual page
    5. The updatehosts.daily script
  16. Hosts to named configuration files
    1. Introduction
    2. The mkrevhosts script
  17. xargs: A public domain implementation
    1. Introduction
    2. The Makefile file
    3. The xargs.c file
    4. The xargs.1 file