Essential System Administration, 3rd Edition
Content Introduction to System Administration
This chapter claims to make you think like a system administrator, I didn't feel any different after reading it, maybe I already think like one ;-). Most of it is about use of superuser privileges (su, sudo). Other parts are communicating with users (talk, wall, motd - but no mention of e-mail or phone) and GUI-based vs. command-line administration.
The Unix WayHere starts the real stuff: files, processes and devices. A very gentle but thorough introduction to all possibilities of file and directory ownership (chmod, chown, mode strings, numeric modes), next is a description of how files map to disks. The processes are covered on a fairly abstract level, only something about various types (interactive, batch, daemon) and attributes (but no way to show them, not even an example usage of ps or top - that's left for chapter 15). The part on devices is basic, but shows the some commands to list information about devices. Last part in this chapter is about the generic UNIX filesystem layout.
Essential Administrative Tools and TechniquesHere are some of the most important commands and techniques for everyday use: man, grep, awk, find (including how to pipe). Some of the examples are fairly complicated for a novice, a basic knowledge of piping and shell usage is assumed. Next are some methods of handling files and directories (cp, mkdir, diff, rm), periodic execution (cron), logging (syslog, managing log files) and software package management (the most important commands to Linux rpm, Solaris pkg*, etc.) and manual software installation (.configure, make, make install).
Startup and ShutdownContains a fairly detailed description of what happens when a system boots up or shuts down. This includes all the gooey stuff about initialization files, runlevels and how to customize those. Last but not least is a short troubleshooting guide, "When the System won't boot."
TCP/IP NetworkingThe chapter starts with a gentle introduction to TCP/IP and related hardware and explains step-by-step a starting TCP/IP session with dumps and comments. Going on it digs deeper and explains IP addressing, subnets and even a little bit IPv6. The first hands-on part deals with network configuration (ifconfig, configuration files, DHCP, name resolution). A short troubleshooting guide (ping, arp) rounds off the chapter.
Managing Users and GroupsThis part starts with a description of the essential files (/etc/passwd, /etc/shadow, /etc/groups) and how to add/remove users and other aspects of user and group management. The default tools for each distribution are also mentioned. Then a whole slew of pages are dedicated to password selection, cracking and enforcing password policies (though I prefer stronger passwords than those given on page 301). The last pages give an introduction to PAM (mostly Linux) and LDAP (mostly OpenLDAP).
SecurityThis is indeed a very good introduction to UNIX security and its lines of defense (though I did miss "disable remote root login" and "give users no shell when they don't need it"), next are common mistakes, setuid/setgid access modes and ACLs. A short introduction to PGP/GPG and role-based access control is given. The next big part is about network security: OpenSSH, TCP Wrappers and nmap are introduced; the ubiquitous advice "disable what you don't need" is also given. Firewalls are briefly mentioned, some links to actual products e.g. ipfilter or Netfilter would have been nice. A nice checklist-style guide to hardening an UNIX system is given and the chapter concludes with managing problems and monitoring. I did miss some links to resources on the Internet and a reminder on the importance of frequent patching (Sun recently published a nice whitepaper on this topic).
Managing Network ServicesThis chapter builds on the foundation built in the chapter on TCP/IP, as such it covers various basic networking services and starts with name resolution via DNS, mentioning configuration and usage of the common tools (BIND, nslookup, host, dig). This is followed by a part on getting out of the local network (routed, gated), getting others on your network (DHCP) and managing (netstat, ping, traceroute, SNMP) and monitoring (tcpdump, snoop). The chapter ends with short introductions to dedicated packages (e.g. NetSaint, MRTG/RRDTool).
Electronic MailNext is a chapter on that other big network nuisance^W service: mail. It starts with a gentle introduction to the basics (SMTP, MX records, POP/IMAP). The part on MTAs starts with everybody's darling *cough* sendmail which is covered exhaustively. The other MTA covered is Postfix, which also receives fairly extensive coverage. The rest of the chapter covers mail processing (fetchmail, procmail), there is no mention of other MTA, MUAs, or other modern mail processing tools (e.g. against spam). Though this chapter is well done, and a nice introduction to mail in general, I would prefer to get rid of it in favor of a "mail-is-only-for-dedicated-servers" policy. A short note on how to deactivate or remove the default MTA should be included in the previous chapter (yes, I know that not everyone shares this point of view).
Filesystems and DisksA very long chapter on filesystems and disks with tons of information on how to create, mount/unmount, repair and monitor filesystems, including some stuff about logical volume managers and RAID. Nicely indexed, it makes a good reference but is boring to read it all (I didn't :-). The last pages are a short introduction to NFS and Samba, but do not cover all the advanced aspects.
Backup and RestoreCovers the tedious taks of backup with all the different aspects: planning backup, strategies to manage the workload, what media to use, what tools are available in a standard setup (tar, cpio, dump, dd, mt, restore). Next is a coverage of the package Amanda and what to look for in commercial packages. Last but not least "restoring from scratch" is covered.
Serial Lines and DevicesHerein is all the stuff about serial devices (tty, termcap, terminfo, stty), usage of USB is covered for FreeBSD, Linux and Solaris.
Printers and the Spooling SubsystemContains lots on "old school" printing (BSD spooling facility: LPD, System V printing, AIX spooling facility), a short note "Print Services for UNIX" on Windows NT/2000 (works pretty well for basic usage) and on providing print services for Windows by Samba. LPRng and CUPS also get a few pages. Closeout for this chapter is font management under X, which contains a rant on how cumbersome font management is ;-).
Automating Administrative TasksThis chapter appeals to a healthy laziness which might save some manual work. It contains some samples and introductions, the best it can do is make appetite for more. Included are: shell script (C-shell), tips for testing and debugging, Perl (including there is more than one way to do it-proof), Expect, C and the lesser known tools Cfengine, Stem. It closes with some short notes on how to create a man page for your own software.
Managing System ResourcesThis chapter wants to make you think a about system performance before you try to manage it. General steps are given: define, determine, formulate, design, implement, monitor and return to start ...
After the general introduction the chapter gets hands-on with monitoring - ps (it is in there after all ...) with all System V and BSD options, pstree and top are covered. The /proc filesystem is mentioned with some samples of how information can be gathered. Process limits are discussed, including how to disallow the creation of core dumps. Signaling and killing processes with kill and killall is covered next. The next chunks in this big chapter are managing CPU (nice, AIX and Solaris scheduler, cron), memory (paging, recognize memory problems), I/O (performance, disk quotas), network (netstat, some notes on DNS and NFS)
Configuring and Building KernelsThis chapter is essentially a bunch of short guides on what to look for when configuring and building a kernel, for Linux lilo is also explained.
AccountingThis is an introduction to what components are relevant for accounting, and how to enable/disable it. As such it shows what can be done with the standard tools on BSD-style accounting (sa, ac) and System V-style accounting. A few pages are dedicated to printing accounting.
Appendix: Administrative Shell ProgrammingThis is a more thorough introduction to shell programming that could have been integrated in the chapter Automating Administrative Task. Other than that it is a solid, short reference to shell programming.
IndexLast but not least is a very concise index (50+ pages), which makes it easy to find anything that's in the book.
What's badThere's not much I really disliked in the book, I can recommend to anyone who needs an introduction to UNIX system administration or a general reference text. Some points are: it's not on UNIX CD Bookshelf v3.0, which is a pity for reference usage, there are almost no links to WWW sites of interest, almost all links to further information are to other O'Reilly books (granted, most of them are quite good) and sometimes I found the order in which themes are discussed slightly less than optimal for "junior administrators".
What's goodAlmost everything (writing style, coverage), except those few issues mentioned in "What's bad". The very good index makes it easy to find the information that is applicable in your special situation, even with all those different UNIXes. If you are looking for a general UNIX reference and/or introduction, look no further (you might want to compare it with "The UNIX Systems Administration Handbook", and decide for yourself, note that the USAH does not cover AIX).
You can purchase Essential System Administration, 3rd Edition from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Also, most of these versions of UNIX found in this book (Red Hat 7.3, SuSE 8.0) are certainly ones you would find in production as well. I am not seeing much Red Hat 8 or 9 on production servers, at least not in my market (Midwest).
-- 4 8 15 16 23 42
I was just packing up to move my office, and looking at all the mostly-redundant Unix and Linux administration books, and realizing that although I have more than two dozen on different aspects, I open maybe one or two of them once or twice a year. Everything else it's just easier to pursue online. I'm a believer that the book format has real advantages, particularly when fresh to a subject area. When I take up some totally new technology again, I'll buy a half-dozen books on it again. Maybe. If the online resources aren't there yet.
... and any place I have the choice these days I prefer Gentoo. It's better laid out. It's more current. It better optimizes for the hardware. Or if I just want to give someone a slick workstation in a hurry, Knoppix (yeah, it's Debian-based, but it's way ahead of it too).
As for what flavor of Linux to cover, I've run Slackware, Red Hat, Mandrake and Debian in production environments
"with their freedom lost all virtue lose" - Milton
In my spare time, I admin a small network of machines for the my university's computer society. Sometimes, I tweak things when I'm in the room, but most of the time things need changing when I'm at home, so remote access to admin tools is important to me.
I have a 1Mbit Internet connection, so in theory I should have no problems with remote X sessions for graphical configuration. In practice this is only true of apps that use motif or similar, anything that uses gtk or qt is a pain to use over anything < 10Mbit. My first comment about graphical admin tools under Linux then is that they should be graphically simple.
Another thing I find with Linux graphical config tools is that they rarely give you the power of editing the config file. The only graphical tool I think I've ever actually used (as opposed to firing up, saying yuck and going back to the terminal) is the printconf-gui tool, since it was a quick and simple way of setting up the room's printer. Beyond that it's bash and vim all the way (from whatever terminal I happen to have, and no I'm not hard-core enough to use vi if I have the option of vim).
On my windows box, the situation is completely the reverse. All my configuration is done from MMC (Microsoft managment console), and on a single machine I prefer this. The options are layed out in a logical structure (which is not to say that they aren't under Linux, where tab completion and guesswork from /etc/ can find the config file I'm looking for 80% of the time). It requires almost no effort to use, which is what I want on my home PC.
I think my point is that I don't really care whether the config is graphical or textual, as long as it's logical, and can be accessed remotely. If there were a powerful remote admin tool for Linux that I could use over a 1Mbit (shared) connection, I might use it. On the other hand firing up an X server is more effort than ssh, so I might not.
I certainly wouldn't trust a sysadmin who could only use such tools. If they speed up the way you work, then great, but a sysadmin has to know how to fix things when it all goes wrong (and X fails to start, for example).
I am TheRaven on Soylent News
Unalias? To unalias something, you have to alias it first. I've never seen a Unix with rm, cp, or mv aliased out of the box.
If you need to alias these commands, you're probably typing too fast and thinking too little.
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
We use this book for a UNIX class I'm taking right now at my university. It's great. I've learned so much from it. I think the nicest thing about it is that it shows you how to do things in 5 different flavors of unix. My class focuses on Solaris, but as I'm going along I read the Linux and FreeBSD sections too, I've learned so much from this book. It's a great reference to have. I've pretty much read the entire book and I advice anyone who doensen't own this book and is interested in any form of *nix to go out and buy it NOW. You will learn a lot. And if you're already expereienced with *nix, then it would be be great to have as a reference. Sorry for sounding like an advertisement, but this truly is a great book.