BSD Hacks is all about making the most of your BSD system.
Chapter 1. Customizing the User Environment
Section 0. Introduction
Section 1. Get the Most Out of the Default Shell
Section 2. Useful tcsh Shell Configuration File Options
Section 3. Create Shell Bindings
Section 4. Use Terminal and X Bindings
Section 5. Use the Mouse at a Terminal
Section 6. Get Your Daily Dose of Trivia
Section 7. Lock the Screen
Section 8. Create a Trash Directory
Section 9. Customize User Configurations
Section 10. Maintain Your Environment on Multiple Systems
Section 11. Use an Interactive Shell
Section 12. Use Multiple Screens on One Terminal
Chapter 2. Dealing with Files and Filesystems
Section 12. Introduction
Section 13. Find Things
Section 14. Get the Most Out of grep
Section 15. Manipulate Files with sed
Section 16. Format Text at the Command Line
Section 17. Delimiter Dilemma
Section 18. DOS Floppy Manipulation
Section 19. Access Windows Shares Without a Server
Section 20. Deal with Disk Hogs
Section 21. Manage Temporary Files and Swap Space
Section 22. Recreate a Directory Structure Using mtree
Section 23. Ghosting Systems
Chapter 3. The Boot and Login Environments
Introduction
Section 24. Customize the Default Boot Menu
Section 25. Protect the Boot Process
Section 26. Run a Headless System
Section 27. Log a Headless Server Remotely
Section 28. Remove the Terminal Login Banner
Section 29. Protecting Passwords With Blowfish Hashes
Section 30. Monitor Password Policy Compliance
Section 31. Create an Effective, Reusable Password Policy
Section 32. Automate Memorable Password Generation
Section 33. Use One Time Passwords
Section 34. Restrict Logins
Chapter 4. Backing Up
Introduction
Section 35. Back Up FreeBSD with SMBFS
Section 36. Create Portable POSIX Archives
Section 37. Interactive Copy
Section 38. Secure Backups Over a Network
Section 39. Automate Remote Backups
Section 40. Automate Data Dumps for PostgreSQL Databases
Section 41. Perform Client-Server Cross-Platform Backups with Bacula
Chapter 5. Networking Hacks
Introduction
Section 42. See Console Messages Over a Remote Login
Section 43. Spoof a MAC Address
Section 44. Use Multiple Wireless NIC Configurations
Section 45. Survive Catastrophic Internet Loss
Section 46. Humanize tcpdump Output
Section 47. Understand DNS Records and Tools
Section 48. Send and Receive Email Without a Mail Client
Section 49. Why Do I Need sendmail?
Section 50. Hold Email for Later Delivery
Section 51. Get the Most Out of FTP
Section 52. Distributed Command Execution
Section 53. Interactive Remote Administration
Chapter 6. Securing the System
Introduction
Section 54. Strip the Kernel
Section 55. FreeBSD Access Control Lists
Section 56. Protect Files with Flags
Section 57. Tighten Security with Mandatory Access Control
Section 58. Use mtree as a Built-in Tripwire
Section 59. Intrusion Detection with Snort, ACID, MySQL, and FreeBSD
Section 60. Encrypt Your Hard Disk
Section 61. Sudo Gotchas
Section 62. sudoscript
Section 63. Restrict an SSH server
Section 64. Script IP Filter Rulesets
Section 65. Secure a Wireless Network Using PF
Section 66. Automatically Generate Firewall Rules
Section 67. Automate Security Patches
Section 68. Scan a Network of Windows Computers for Viruses
Chapter 7. Going Beyond the Basics
Introduction
Section 69. Tune FreeBSD for Different Applications
Section 70. Traffic Shaping on FreeBSD
Section 71. Create an Emergency Repair Kit
Section 72. Use the FreeBSD Recovery Process
Section 73. Use the GNU Debugger to Analyze a Buffer Overflow
Section 74. Consolidate Web Server Logs
Section 75. Script User Interaction
Section 76. Create a Trade Show Demo
Chapter 8. Keeping Up-to-Date
Introduction
Section 77. Automated Install
Section 78. FreeBSD from Scratch
Section 79. Safely Merge Changes to /etc
Section 80. Automate Updates
Section 81. Create a Package Repository
Section 82. Build a Port Without the Ports Tree
Section 83. Keep Ports Up-to-Date with CTM
Section 84. Navigate the Ports System
Section 85. Downgrade a Port
Section 86. Create Your Own Startup Scripts
Section 87. Automate NetBSD Package Builds
Section 88. Easily Install Unix Applications on Mac OS X
Chapter 9. Grokking BSD
Introduction
Section 89. How'd He Know That?
Section 90. Create Your Own Manpages
Section 91. Get the Most Out of Manpages
Section 92. Apply, Understand, and Create Patches
Section 93. Display Hardware Information
Section 94. Determine Who Is on the System
Section 95. Spelling Bee
Section 96. Leave on Time
Section 97. Run Native Java Applications
Section 98. Rotate Your Signature
Section 99. Useful One-Liners
Section 9.13. Fun with X
To master BSD, you'll have to understand several topics. We've arranged the hacks loosely into chapters. They are:
Chapter 1 Customizing the User Environment
Though modern BSDs have myriad graphical applications and utilities, the combined wisdom of 35 years of command-line programs is just a shell away. This chapter demonstrates how to make the most of the command line, customizing it to your needs and preferences.
Chapter 2 Dealing with Files and Filesystems
What good is knowing Unix commands if you have no files? You have to slice, dice, and store data somewhere. This chapter explains techniques for finding and processing information, whether it's on your machine or on a server elsewhere.
Chapter 3 The Boot and Login Environments
The best-laid security plans of administrators often go out the window when users enter the picture. Keeping the bad guys off of sensitive machines requires a two-pronged approach: protecting normal user accounts through good password policies and protecting the boxes physically. This chapter explores several options for customizing and securing the boot and login processes.
Chapter 4 Backing Up
After you start creating files, you're bound to run across data you can't afford to lose. That's where backups come in. This chapter offers several ideas for various methods of ensuring that your precious data will persist in the face of tragedy.
Chapter 5 Networking Hacks
Unless you're a die-hard individualist, you're likely connected to a network. That fact presents several new opportunities for clever hacks as well as mystifying failures. This chapter illuminates ways to take advantage of your network connection.
Chapter 6 Securing the System
Security is as much a mindset as it is a process. Knowing the tools at your disposal will help. This chapter delves into multiple tools and ideas for increasing the security of your systems, whether keeping out the bad guys or staying on top of updates.
Chapter 7 Going Beyond the Basics
With years and years of refinement, the BSDs provide powerful and maintainable environments. Are you taking full advantage of everything your system has to offer? This chapter pushes the envelope of what you can accomplish.
Chapter 8 Keeping Up-to-Date
No bragging about BSD is complete without mentioning the ports or packages system that keeps thousands of applications right at your fingertips. Keeping up-to-date could never be easier, could it? This chapter tackles the subject of installing and updating software, including the core system.
Chapter 9 Grokking BSD
You cannot be a true BSD master until you grok the Unix mindset. How did the gurus become gurus? Is the true path still open? This chapter reveals some secrets of the masters and has a little fun along the way.