Oreilly.Linux.Server.Hacks.Jan.2003.pdf

(2351 KB) Pobierz
690620219 UNPDF
690620219.002.png
690620219.003.png
SERVER
HACKS
Rob Flickenger
Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo
LINUX
690620219.004.png
Linux Server Hacks
by Rob Flickenger
Copyright © 2003 O’Reilly Media, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly Media, Inc. books may be purchased for educational, business, or sales promotional
use. Online editions are also available for most titles ( safari.oreilly.com ). For more
information, contact our corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com .
Editor:
Dale Dougherty
Production Editor:
Sarah Sherman
Series Editor:
Rael Dornfest
Cover Designer:
Edie Freedman
Executive Editor:
Dale Dougherty
Interior Designer:
David Futato
Printing History:
January 2003: First Edition.
Nutshell Handbook, the Nutshell Handboook logo, and the O’Reilly logo are registered
trademarks of O’Reilly Media, Inc. The association between the image of an ax and the topic
of Linux servers is a trademark of O’Reilly Media, Inc.
The trademarks “Hacks Books” and “The Hacks Series,” and related trade dress, are owned
by O’Reilly Media, Inc., in the United States and other countries, and may not be used
without written permission.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and O’Reilly Media,
Inc. was aware of a trademark claim, the designations have been printed in caps or initial
caps. All other trademarks are property of their respective owners.
While every precaution has been taken in the preparation of this book, the publisher and
author assume no responsibility for errors or omissions, or for damages resulting from the use
of the information contained herein.
ISBN13: 978-0-596-00461-3
This book uses RepKover, a durable and flexible lay-flat binding.
[C]
[4/08]
690620219.005.png
Contents
Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
How to Become a Hacker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiii
Chapter 1. Server Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1. Removing Unnecessary Services
3
2. Forgoing the Console Login
6
3. Common Boot Parameters
7
4. Creating a Persistent Daemon with init
9
5. n>&m: Swap Standard Output and Standard Error
10
6. Building Complex Command Lines
12
7. Working with Tricky Files in xargs
15
8. Immutable Files in ext2/ext3
17
9. Speeding Up Compiles
19
10. At Home in Your Shell Environment
20
11. Finding and Eliminating setuid/setgid Binaries
23
12. Make sudo Work Harder
25
13. Using a Makefile to Automate Admin Tasks
27
14. Brute Forcing Your New Domain Name
29
15. Playing Hunt the Disk Hog
30
16. Fun with /proc
31
17. Manipulating Processes Symbolically with procps
34
18. Managing System Resources per Process
36
19. Cleaning Up after Ex-Users
38
iii
690620219.001.png
Zgłoś jeśli naruszono regulamin