Log In
Or create an account -> 
Imperial Library
  • Home
  • About
  • News
  • Upload
  • Forum
  • Help
  • Login/SignUp

Index
Automating System Administration with Perl
SPECIAL OFFER: Upgrade this ebook with O’Reilly Preface
What’s New in This Edition? How This Book Is Structured Typographical Conventions Operating System Naming Conventions Coding Conventions Using Code Examples How to Contact Us Safari® Books Online Acknowledgments from the First Edition Acknowledgments for the Second Edition
1. Introduction
Automation Is a Must How Perl Can Help You This Book Will Show You How What You Need Some Notes About the Perl Versions Used for This Book
What About Perl 5.10? What About Strawberry Perl? What About Perl 6?
Some Notes About Using Vista with the Code in This Book Locating and Installing Modules
Installing Modules on Unix Installing Modules on Win32
It’s Not Easy Being Omnipotent
Don’t Do It Drop Your Privileges As Soon As Possible Be Careful When Reading Data Be Careful When Writing Data Avoid Race Conditions Enjoy
References for More Information
2. Filesystems
Perl to the Rescue Filesystem Differences
Unix Windows-Based Operating Systems Mac OS X Filesystem Differences Summary Dealing with Filesystem Differences from Perl
Walking or Traversing the Filesystem by Hand Walking the Filesystem Using the File::Find Module Walking the Filesystem Using the File::Find::Rule Module Manipulating Disk Quotas
Editing Quotas with edquota Trickery Editing Quotas Using the Quota Module
Editing NTFS Quotas Under Windows Querying Filesystem Usage Module Information for This Chapter References for More Information
3. User Accounts
Unix User Identities
The Classic Unix Password File Changes to the Password File in BSD 4.4 Systems
Extra fields in passwd files The binary database format
Shadow Passwords
Windows-Based Operating System User Identities
Windows User Identity Storage and Access Windows User ID Numbers Windows Passwords Don’t Play Nice with Unix Passwords Windows Groups Windows User Rights
Building an Account System to Manage Users
The Backend Database
Adding to the account queue
The Low-Level Component Library
Unix account creation and deletion routines Unix account creation and deletion routines—a variation Windows account creation and deletion routines
The Process Scripts Account System Wrap-Up
Module Information for This Chapter References for More Information
Unix Password Files Windows User Administration
4. User Activity
Process Management
Windows-Based Operating System Process Control
Using external binaries Using the Win32::Process::Info module Using the GUI control modules (Win32::Setupsup and Win32::GuiTest) Using Windows Management Instrumentation (WMI)
Unix Process Control
Calling an external program Examining the kernel process structures Using the /proc filesystem Using the Proc::ProcessTable module
File and Network Operations
Tracking File Operations on Windows Tracking Network Operations on Windows Tracking File and Network Operations in Unix
Module Information for This Chapter
Installing Win32::Setupsup
References for More Information
5. TCP/IP Name and Configuration Services
Host Files
Generating Host Files Error-Checking the Host File Generation Process Improving the Host File Output Incorporating a Source Code Control System
NIS, NIS+, and WINS
NIS+ Windows Internet Name Server (WINS)
Domain Name Service (DNS)
Generating DNS (BIND) Configuration Files
Creating the administrative header Generating multiple configuration files
DNS Checking: An Iterative Approach
Using nslookup Working with raw network sockets Using Net::DNS
DHCP
Active Probing for Rogue DHCP Servers Monitoring Legitimate DHCP Servers
Module Information for This Chapter References for More Information
6. Working with Configuration Files
Configuration File Formats
Binary Naked Delimited Data Key/Value Pairs Markup Languages
XML Writing XML from Perl Survey of best-practice tools to parse and manipulate XML from Perl Working with XML using XML::Simple Working with XML using XML::LibXML Working with XML using SAX2 via XML::SAX Working with XML using a hybrid approach (XML::Twig) YAML
All-in-One Modules Advanced Configuration Storage Mechanisms Module Information for This Chapter References for More Information
XML and YAML
7. SQL Database Administration
Interacting with a SQL Server from Perl Using the DBI Framework Using ODBC from Within DBI Server Documentation
MySQL Server via DBI Oracle Server via DBI Microsoft SQL Server via ODBC
Database Logins Monitoring Space Usage on a Database Server Module Information for This Chapter References for More Information
DBI Microsoft SQL Server ODBC Oracle
8. Email
Sending Mail
Getting sendmail (or a Similar Mail Transport Agent) Using the OS-Specific IPC Framework to Drive a Mail Client Speaking the Mail Protocols Directly
Sending vanilla mail messages with Email::Send Sending mail messages with attachments using Email::Send Sending HTML mail messages using Email::Send
Common Mistakes in Sending Email
Overzealous Message Sending
Controlling the frequency of mail Controlling the amount of mail
Subject Line Waste Insufficient Information in the Message Body
Fetching Mail
Talking POP3 to Fetch Mail Talking IMAP4rev1 to Fetch Mail
Processing Mail
Dissecting a Single Message Dissecting a Whole Mailbox Dealing with Spam
SpamAssassin Feedback loops
Support Mail Augmentation
Module Information for This Chapter References for More Information
9. Directory Services
What’s a Directory? Finger: A Simple Directory Service The WHOIS Directory Service LDAP: A Sophisticated Directory Service
LDAP Programming with Perl The Initial LDAP Connection Performing LDAP Searches Entry Representation in Perl Adding Entries with LDIF Adding Entries with Standard LDAP Operations Deleting Entries Modifying Entry Names Modifying Entry Attributes Deeper LDAP Topics
Referrals and references Controls and extensions The root DSE DSML
Putting It All Together
Active Directory Service Interfaces
ADSI Basics Using ADSI from Perl Dealing with Container/Collection Objects Identifying a Container Object So How Do You Know Anything About an Object? Searching Performing Common Tasks Using the WinNT and LDAP Namespaces Working with Users via ADSI Working with Groups via ADSI Working with File Shares via ADSI Working with Print Queues and Print Jobs via ADSI Working with Windows-Based Operating System Services via ADSI
Module Information for This Chapter References for More Information
LDAP ADSI
10. Log Files
Reading Text Logs Reading Binary Log Files
Using unpack() Calling an OS (or Someone Else’s) Binary Using the OS’s Logging API
Structure of Log File Data Dealing with Log File Information
Space Management of Logging Information
Log rotation Circular buffering
Input blocking in log-processing programs Security in log-processing programs
Log Parsing and Analysis
Stream read-count A simple stream read-count variation Read-remember-process Black boxes Using databases
Using Perl-only databases Using Perl-cliented SQL databases
Writing Your Own Log Files
Logging Shortcuts and Formatting Help Basic/Intermediate Logging Frameworks Advanced Logging Framework
Module Information for This Chapter References for More Information
11. Security
Noticing Unexpected or Unauthorized Changes
Local Filesystem Changes Changes in Data Served Over the Network
Noticing Suspicious Activities
Local Signs of Peril Finding Problematic Patterns
Danger on the Wire, or “Perl Saves the Day” Preventing Suspicious Activities
Suggest Better Passwords Reject Bad Passwords
Module Information for This Chapter References for More Information
12. SNMP
Using SNMP from Perl
Sending and Receiving SNMP Traps, Notifications, and Informs Alternative SNMP Programming Interfaces
Module Information for This Chapter References for More Information
13. Network Mapping and Monitoring
Network Mapping
Discovering Hosts Discovering Network Services Physical Location
Observation 1: Proximity can help Observation 2: Conventions can help
Presenting the Information
Textual Presentation Tools Graphical Presentation Tools
Using the GD::Graph module family Using GraphViz Using RRDtool
Monitoring Frameworks
Extending Existing Monitoring Packages
Xymon Mon Nagios
What’s Left? Module Information for This Chapter References for More Information
14. Experiential Learning
Playing with Timelines
Task One: Parsing crontab Files Task Two: Displaying the Timeline Task Three: Writing Out the Correct XML File Putting It All Together Summary: What Can We Learn from This?
Playing with Geocoding
Geocoding from Postal Addresses Geocoding from IP Addresses Summary: What Can We Learn from This?
Playing with an MP3 Collection
Summary: What Can We Learn from This?
One Final Exploration
Part One: Retrieving the Wiki Page with WWW::Mechanize Part Two: Extracting the Data Part Three: Geocoding and Mapping the Data Summary: What Can We Learn from This?
Remember to Play Module Information for This Chapter Source Material for This Chapter
A. The Eight-Minute XML Tutorial
XML Is a Markup Language XML Is Picky Two Key XML Terms Leftovers References for More Information
B. The 10-Minute XPath Tutorial
XPath Basic Concepts
Basic Location Paths Predicates Abbreviations and Axes Further Exploration
References for More Information
C. The 10-Minute LDAP Tutorial
LDAP Data Organization
D. The 15-Minute SQL Tutorial
Creating/Deleting Databases and Tables Inserting Data into a Table Querying Information
Retrieving All of the Rows in a Table Retrieving a Subset of the Rows in a Table Simple Manipulation of Data Returned by Queries Adding the Query Results to Another Table
Changing Table Information Relating Tables to Each Other SQL Stragglers
Views Cursors Stored Procedures
E. The Five-Minute RCS Tutorial
References for More Information
F. The Two-Minute VBScript-to-Perl Tutorial
Translation Tactics
Tactic 1: Loading Your Modules Tactic 2: Referencing an Object Tactic 3: Accessing Object Properties Using the Hash Dereference Syntax Tactic 4: Dealing with Container Objects Tactic 5: Converting Method Invocations Tactic 6: Dealing with Constants
References for More Information
G. The 20-Minute SNMP Tutorial
SNMP in Practice
Index About the Author Colophon SPECIAL OFFER: Upgrade this ebook with O’Reilly
  • ← Prev
  • Back
  • Next →
  • ← Prev
  • Back
  • Next →

Chief Librarian: Las Zenow <zenow@riseup.net>
Fork the source code from gitlab
.

This is a mirror of the Tor onion service:
http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion