Errata

Linux Server Hacks

Errata for Linux Server Hacks

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page vii
Contributors List

In the enumeration of contributors, the attributions to various hacks are completely
wrong.

R.D #75 -> #87
K.H #75 -> #89
#75 -> #90
#75 -> #91
S.H #44 -> #47
#53 -> #62
D.L #36 -> #39
C.L #75 -> #77
M.R #36 -> #42
J.V #22 -> #21

Anonymous   
ePub throughout

My Sign In Iframe does not keep up with itself in my Chromebook2 on CB3550-3340 ONE AND ONLY DEVICE at the present.

Carolyn Suzanne Bornn  Jul 13, 2019 
Printed Page 11
2nd paragraph, last sentence

"to redirect file descriptor to errfile"

should be:

"to redirect file descriptor 2 to errfile"
or possibly:
"to redirect file descriptor two to errfile"

... to match the example immediately following. Even if it was meant to say an unqualified "file descriptor", meaning FD1, the grammar is incorrect.

tcordes  Mar 25, 2015 
Printed Page 11
2nd command example block

Spurious backslash at and of 1st line:
$ command | ...\

Backslash is not in bold, unlike the preceding characters, so it's almost certainly a markup artifact, and in any case doesn't make any sense there (though it is legal syntax).

tcordes  Mar 25, 2015 
Printed Page 12
Colored heading for Hack #6

The brown color text in the heading changes from darker brown to lighter brown mid-heading between the e and the x in "Complex". I thought it was a print press error, but, if you look closely, the dithering changes, meaning this is caused by faulty formatting commands.

tcordes  Mar 27, 2015 
Printed Page 13
4th text paragraph, 2nd sentence

Incorrect punctuation: period inside the parentheses:

"dynamic content (like cgi scripts.)"

Period should be outside the parentheses in this instance, much like the example on the same page, last paragraph, first sentence.

tcordes  Mar 25, 2015 
Printed Page 16
albumize script, line 12

echo -n `echo $x|cut -f 2- -d '-'`;echo -ne '00'
should read:
echo -n `echo $x|cut -f 2 -d '-'`;echo -ne '00'

Anonymous   
Printed Page 23
3rd paragraph from bottom of page

This is a little more than a minor technical error, but not a serious error.

The first two sentences of the paragraph are:

Not much surprise here. at and crontab need root privileges
in order to change to the user that requested the at job or
cron job.

The second sentence is false. Both sentences should be replaced
with the following:

When a user schedules an at or cron job using the at and crontab
commands, the details of the job are written to a directory that is
not accessible to non-root users.The commands need root privileges
in order to allow the user to successfully submit their at or cron
job.

Anonymous   
Printed Page 33
2nd last paragraph, 2nd sentence

"to land in the directory from which process ID 3852 was run"
should be:
"to land in the current working directory of process ID 3852"

The cwd symlink doesn't point to the original cwd of the process, it always points to the current cwd of the process.

tcordes  Mar 25, 2015 
Printed Page 33
2nd last paragraph, 2nd sentence

Incorrect punctuation: period inside the parentheses:

"of this process (you can, for example, cd /proc/3852/cwd to land in the directory from which process ID 3852 was run.)"

Period should be outside the parentheses in this instance, much like the example on the same page, 2nd text paragraph, last sentence.

tcordes  Mar 25, 2015 
Printed Page 33
2nd last paragraph, 3rd sentence

"The exe link points to full path to the binary"
should be:
"The exe link points to the full path to the binary"

tcordes  Mar 25, 2015 
Printed Page 33
Last paragraph, 1st sentence

"processes" is possessive, not plural, and should be process's or process', depending on your favoured style.

tcordes  Mar 25, 2015 
Printed Page 37
1st text paragraph

"and back grounded processes"
should be:
"and backgrounded processes"

tcordes  Mar 25, 2015 
Printed Page 41
3rd paragraph, 3rd sentence

Incorrect punctuation: period inside the parentheses:

"Select your drivers carefully (hitting Y for built-in drivers, and M for loadable modules.)"

Period should be outside the parentheses in this instance, much like the examples in the two preceding sentences.

tcordes  Mar 25, 2015 
Printed Page 42
Last sentence on page 42

The final sentence implies that loadlin is used primarily to multiboot between two
systems. In fact, many serious Linux sysadmins use loadlin as the default boot
loader to avoid the problems with LILO/GRUB. The final sentence implies otherwise.

Anonymous   
Printed Page 42
2nd last text paragraph

Incorrect punctuation: period inside the parentheses:

"the High Memory Support setting (a.k.a. the CONFIG_NOHIGHMEM define.)"

Period should be outside the parentheses in this instance, much like the example on the same page, first paragraph, last sentence. This page, in the 3rd last paragraph, last sentence, contains one of the few examples in the book where the period belongs in the parentheses (and is correct).

tcordes  Mar 25, 2015 
Printed Page 43
1st paragraph, 1st sentence

Incorrect punctuation: period inside the parentheses:

"total system RAM at boot.)"

Period should be outside the parentheses in this instance, much like the example on the same page (2nd last paragraph, 2nd sentence) does with the comma.

tcordes  Mar 25, 2015 
Printed Page 45
Last text paragraph

First sentence completely missing its period: after "Java application)"

tcordes  Mar 25, 2015 
Printed Page 54
The "See Also" for Hack #26, near bottom of page

The last two bullet points of the "See Also" should be "links" to Hacks #36 and #66 respectively, much like they are elsewhere in the book (for example Hack #38). They should be formatted as such, not just confusing, seemingly random, italic text.

tcordes  Mar 25, 2015 
Printed Page 55
4th text paragraph, last sentence, and following code example

At "try this perl one-liner" followed by a colon: the example following is devoid of any perl one-liner. The text leads one to believe you are going to be shown the one-liner here. If you meant for the code example merely to be linked to in the referenced hack #73 (which it is, buried with 10 other examples), the wording here should perhaps be changed to:

"try the perl one-liner shown in [Hack link]."

tcordes  Mar 27, 2015 
Printed Page 60
2nd last text paragraph, 1st sentence

In "The special CVS file notify", the word "notify" should be in italics, much as the word "users" is in the same paragraph, third sentence. In both cases a literal filename is being referred to.

tcordes  Mar 27, 2015 
Printed Page 61
2nd code/command example

Spurious "<code>" at the end of the example. It doesn't make any sense there, and it is not in bold like the preceding text, it is most likely a text/formatting typo of some sort.

tcordes  Mar 27, 2015 
Printed Page 62
4th text paragraph, 2nd and 3rd setences

Incorrect punctuation: period inside the parentheses:

"is another common choice.)"
and
"quick way to do that.)"

Period should be outside the parentheses in both instances, much like the example on the same page, 2nd paragraph, 1st sentence.

tcordes  Mar 27, 2015 
Printed Page 63
1st paragraph, 2nd sentence

"contained with in it"
should be:
"contained within it"

tcordes  Mar 27, 2015 
Printed Page 63
2nd paragraph, 1st sentence

Incorrect punctuation: period inside the parentheses:

"logins with pserver.)"

Period should be outside the parentheses in this instance, much like the example on the following page, middle of 2nd paragraph.

tcordes  Mar 27, 2015 
Printed Page 63
5th text paragraph, 2nd sentence, hack link

The referenced hack number and title is wrong, it should be Hack #17, not #23.

tcordes  Mar 27, 2015 
Printed Page 65
3rd text paragraph (1st large one), 2nd sentence

The whole sentence makes no sense. "tar" is not a "design decision" in "ssh". ssh knows nothing about tar. Perhaps saying instead "the ability of ssh to use standard input/output, like with tar," is a brilliant design decision would make more sense. It needs a whole new rejigging.

tcordes  Mar 27, 2015 
Printed Page 66
Hack #37's "See also" section, 2nd link

2nd Hack link is improperly formatted (color, wording, symbols), unlike the two surrounding links.

tcordes  Mar 27, 2015 
Printed Page 73
1st paragraph

Where it says how to restore the boot sector directly from a floppy, I believe
the suggested command would not only overwrite the intended first 512 bytes on
the hard drive where the boot sector resides but actually write the full contents
of the floppy (1.44 MB typically) to the beginning of the hard drive.

That's a whole lot more data than just the boot sector that would be overwritten
on the hard drive, so it could be disastrous.

Command as seen in my copy of the book:
dd if=/dev/fd0 of=/dev/hda

More appropriate command:
dd if=/dev/fd0 of=/dev/hda bs=512 count=1

(Same as when backing up but with if and of parameters swapped.)

Anonymous   
Printed Page 78
code example, 13th last line (including blank lines)

Using $SHELL here won't work if the user's shell is not bash. For instance, this breaks when the user's shell is tcsh. (Granted, most Linux users will have bash as their default shell.) The problem is that SHELL is not being defined in the script, and so takes its value from the environment. The solution is to defined SHELL as /bin/bash at the top of the script, so the user's environment is overridden.

The reason this code line breaks, even when a non-bash shell accepts -c (most do), is because push_files is a bash function being exported, and any non-sh derivative (like tcsh) can't execute (or import) bash functions. Even some sh-like variants (like ksh) may not accept exported bash functions.

tcordes  Mar 27, 2015 
Printed Page 78
Last paragraph

Incorrect punctuation: period inside the parentheses:

"and an ssh session.)"

Period should be outside the parentheses in this instance, much like the example in the immediately preceding sentence.

tcordes  Mar 27, 2015 
Printed Page 88
1st paragraph, 2nd sentence

"much of a network admins' time"

You can't have a singular subject, as dictated by the word "a", and a plural possessive use of the apostrophe. It should be:

"much of a network admin's time"
or
"much of network admins' time"

tcordes  Mar 27, 2015 
Printed Page 91
last paragraph, 1st sentence

rp_filter isn't really a "free firewall rule" (i.e., something in iptables), it's a kernel network stack setting. Whilst certainly useful in a "firewall" scenario, its usefulness certainly isn't limited to one.

tcordes  Apr 10, 2015 
Printed Page 91
1st paragraph, 1st sentence

"the console with iptables!) If you"
Needs punctuation outside of the parenthesis, either by moving the exclamation outside, or, better, adding a period and leaving the exclamation where it is. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 96
last set of command examples, 3rd example line

Line-continuation backslash is missing from this line (after "fa:ca:de"). It is present on the two preceding lines.

tcordes  Apr 10, 2015 
Printed Page 97
3rd text paragraph, only sentence

The first half of the sentence is correct: you can't delete a custom chain that has any references to it. The second half -- the remedy -- is wrong. Flushing the rules in chain foo will not get rid of any references to chain foo. The references to chain foo exist in other, "calling", chains. Usually you would not want to indiscriminately flush the calling chains. The only solution is to painstakingly go through all chains looking for calls to chain foo ("-j foo") and then -D deleting them. Only then can you use -X to delete your custom chain.

Note: You will also need to -F flush the rules in chain foo before -X deleting it, but these rules are not called "references" in iptables parlance. A revamping of this whole paragraph would help clarify these issues.

tcordes  Apr 10, 2015 
Printed Page 97
1st sample command output, "Chain fun-filter" line

In this example, "Chain fun-filter (0 references)" should in fact show 1 reference. The onereference is in Chain INPUT. Follow the instructions given and that (1, not 0) is the output you will see.

tcordes  Apr 10, 2015 
Printed Page 98
Last command group on page.

I think I have found the following typo; instead of:

# ip tunnel add mytun mode ipip remote 240.101.83.2
local 251.4.92.217 ttl 255
# ifconfig tunl0 10.42.2.1

the author intended to write "mytun" instead of "tunl0", namely:

# ip tunnel add mytun mode ipip remote 240.101.83.2
local 251.4.92.217 ttl 255
# ifconfig mytun 10.42.2.1

Anonymous   
Printed Page 98
1st paragraph, last sentence

"...remote clients appear to exist on the network services, or more generally, to connect to any two private networks together..."

This sentence has faulty wording, and makes little sense as-is. It makes sense if you remove the word "services" and change "to connect to" to just "to connect".

tcordes  Apr 10, 2015 
Printed Page 100
last command example block

On both lines, the word "ip" is not in bold type, unlike the previous examples on the page.

tcordes  Apr 10, 2015 
Printed Page 101
1st text paragaph (hack #52), 3rd sentence

First word of sentence ("this") is not capitalized.

tcordes  Apr 10, 2015 
Printed Page 104
last command example, 3rd-last line

The line containing "eth0" has sprung up out of nowhere: it and its 10.42.4.0 network are not mentioned anywhere in the hack; and the previous "before" output of the exact same route command on client (page 101) does not contain this line.

I think it was edited out of the page 101 example (for brevity and simplicity) and the same edit was overlooked in the page 104 example. That line should be removed from page 104 to stay consistent, and not confuse the example.

tcordes  Apr 10, 2015 
Printed Page 106
Hack #53, paragraphs 1, 2 and 3

The 3 hack-links (in brown type) are to the wrong hack: surely they are supposed to reference Hack #52 "Using vtun over ssh to Circumvent NAT", not Hack #51.

tcordes  Apr 10, 2015 
Printed Page 107
2nd paragraph, 3rd sentence; and 4th paragraph

Both sentences reference the script named "vtundconf" (as per the Listing heading) as "vtund.conf" (which is the separate config file). Also, in paragraph 4 "currently runs great" should be "currently run great" as the subject consists of two items, not one.

tcordes  Apr 10, 2015 
Printed Page 109
2nd and 5th code "paragraphs"

The compute_netmask subroutine definition and usage of it are nasty. While it works fine, and as intended, it is almost certainly a kludgy miracle. compute_netmask returns a value that is never used anywhere, but looking at the code you will think that is its entire purpose. The calling code ignores the return value and instead relies upon the side-effect of compute_netmask setting $addr and $mask. It's all extremely bad form and will confuse anyone, even perl hackers, but most especially perl newbies.

compute_netmask should "my" its parameters and return($addr,$netmask) and the callers can grab the values with ($addr,$netmask)=compute_netmask(...).

tcordes  Apr 10, 2015 
Printed Page 110
3rd code "paragraph", just before __DATA__

system("$Vtund $name");

This does not "execute vtund" as the comment above it states. $Vtund is set to /bin/echo at the script beginning, and $name will be the temorary filename. So what this code really does (when not in debug mode, see below) is make a temp file of your vtund config and tell you where that file can be found.

In fact, the only reason this code works as it stands is because someone left the $Debug=1 flag set at the beginning of the script. If you meant to do that, then the entire code block at the beginning that creates a temp file can be eliminated (as well as the use POSIX line), and the final code block can be reduced to just "print $template;".

tcordes  Apr 10, 2015 
Printed Page 119
2nd-last paragraph, last sentence

Incorrect punctuation: period inside the parentheses:

"stop displaying idle processes.)"

Period should be outside the parentheses in this instance, much like the example on the next page (1st paragraph, last sentence).

tcordes  Apr 23, 2015 
Printed Page 120
1st paragraph, 2nd sentence

Incorrect punctuation: period inside the parentheses:

"any signal you like.)"

Period should be outside the parentheses in this instance, much like the example in the subsequent sentence.

tcordes  Apr 23, 2015 
Printed Page 121
4th paragraph

To run this script from .bashrc or .bash_profile you need to disable it for scp or
non interactive shells.
if [ -s ] ; then
{
tl&
}

should fix this up..
Otherwuse scp will not work as the header file is too big for scp>>

Anonymous   
Printed Page 122
1st text paragraph, 1st sentence

"bpf filter" is thrown at you without ever (to this point in the book) defining "bpf". I had to go look it up online. Perhaps it should be spelled out by its full name here, and given its acronym, like "Berkeley Packet Filter (BPF)". "bpf" in any case should probably also be all-uppercase.

tcordes  Apr 23, 2015 
Printed Page 123
2nd text paragraph, 1st sentence

"note the ' in the google query"

The glyph used for the apostrophe is a opening single quote: i.e., it's pointing the wrong way. It's referring to the apostrophe in the word O'Reilly, which would require a "closing" single quote, or a "directionless" glyph.

([3/03*] version of the book)

tcordes  Apr 23, 2015 
Printed Page 124
3rd and 4th sample command blocks

"root@catlin:~# nmap -sX 10.42.4.0/26..."

is then followed by text that says "let's run the same command again", but the subsequent command has "localhost" in place of "10.42.4.0/26". They should match.

([3/03*] version of the book)

tcordes  Apr 23, 2015 
Printed Page 126
12 lines up from bottom, including blank lines

printf("%4d - %4d %8d Kb %d %8d Kb %5d\
n",$lastlevel, ...

The backslash and "n" are split by a newline. In this case this is supposed to be a literal newline character "\n", not a line continuation using a backslash. They should both be on the same line.

tcordes  Apr 23, 2015 
Printed Page 129
4th paragraph, 2nd sentence

"The script can continue to watch to watch when ..."

Strike the duplicated "to watch".

tcordes  Apr 23, 2015 
Printed Page 130
2nd paragraph, last sentence

Incorrect punctuation: period inside the parentheses:

"...on it for security and performance reasons.)"

([3/03*] version of the book)

tcordes  Apr 23, 2015 
Printed Page 131
last paragraph, 1st sentence, and Figure 5-1

The sentence refers to Figure 5-2 saying it's a "pie chart", but it's Figure 5-1 that is the pie chart, not 5-2. In fact, the text before Figure 5-1 says 5-1 contains "all sorts of details about what traffic has been seen on your network", but 5-1 is a pie-chart overview, with very few "details". It's almost as if there was supposed to be another figure before 5-1, and it went missing.

([3/03*] version of the book)

tcordes  Apr 23, 2015 
Printed Page 132
Figure 5-2 description text

"overtime" should be "over time"

tcordes  Apr 23, 2015 
Printed Page 133
2nd-last text paragraph, only sentence

"Now you can watch activity on all of your hosts simultaneously with a command, as:"

Awkward wording. It works much better if you change the comma to the word "such". (The previous example uses the wording "like this", which works quite well.) You could also add the word "such" after the comma, but the wording ("with a command") remains odd (of course you'll use "a command", what else would you do?). Perhaps "command" should be qualified with "simple" or "single"?

tcordes  Apr 23, 2015 
Printed Page 139
All of page 139-140 missing

All of the pages which include the start of hac #66 is missing and the link

http://examples.oreilly.com/9780596004613/ch06_chap_start.pdf

You give for the replacement pages points to a 404 Error not found.

It would be nice to read this since it is this hack I was interested in.

Simon.

Simon Bradley  Dec 25, 2008 
Printed Page 140
Last sentence, 3rd last paragraph

"'Turbo-mode' ssh Logins" (#67)
is missing the red/brown colored formatting, and in the actual #67 hack doesn't have single quotes around "Turbo-mode". (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 141
"See also" section, last line

"'Turbo-mode' ssh Logins" (#67)
is missing the red/brown colored formatting, and in the actual #67 hack doesn't have single quotes around "Turbo-mode". Note, this is distinct from the same error that occurs earlier (in the text paragraphs) of hack #66. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 142
Last paragraph, 1st sentence

"installed on each homer, bart"
grammatically incorrect, possibly try:
"installed on each of homer, bart" (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 144
1st paragraph, last sentence; and "See also" section, last line

"'Turbo-mode' ssh Logins" (#67)
is missing the red/brown colored formatting, and in the actual #67 hack doesn't have single quotes around "Turbo-mode". Error occurs in both locations noted above. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 145
Last paragraph, 2nd sentence

"'Turbo-mode' ssh Logins" (#67)
is missing the red/brown colored formatting, and in the actual #67 hack doesn't have single quotes around "Turbo-mode". (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 147
1st command line example set and following paragraph

Command line example set shows ssh of port 8080, but the following text description says port 8000. The next example uses 8000 so that probably is what is intended in the initial example. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 152
1st paragraph, 1st sentence

"it but becomes"
should be
"but it becomes" (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 159
command example after 2nd paragraph

syslogd -m 0 -a...
is missing the bold formatting on the characters up to and including the "-m 0". (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 161
1st paragraph

"matches multiple view statement's match-clients substatements"
should be:
"matches multiple view statements' match-clients substatements"
as statements is plural possessive (as per "multiple"). (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 170
Command example after 1st paragraph

"mysql --dbuser=monitor"...
should be:
"mtop --dbuser=monitor"
Also, the entire example line should be in bold face as per style conventions. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 171
3rd textual paragraph

"]One suggested method"
Should have spurious square bracket removed. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 174
1st paragraph after teh numbered bullet points

"and 9, very carefully.)"
should have the period outside the parenthesis. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 174
Point #9, 1st and 2nd sentence

"Start MySQL on each slave... Finally, fire up MySQL on each slave"
is redundant, both sentences say the same thing. Possibly just delete the first sentence since the second and third sentence repeat the same ideas. (3/03 printing)

tcordes  Jan 11, 2016 
Printed Page 175
Hack 83 Restoring a Single Table from Large Mysql dump

Just a suggestion - it seems like all of my mysql dumps insert backticks all over the place, including the table name, which makes this hack not work. I suggest making the following changes for anyone else having the problem:

Remove the "" from the two spots in extract-table script, so this:

#!/usr/bin/perl -wn
BEGIN { $table = shift @ARGV }
print if /^create table $table/io .. /^create table (?!$table)/io;

becomes this:

#!/usr/bin/perl -wn
BEGIN { $table = shift @ARGV }
print if /^create table $table/io .. /^create table (?!$table)/io;

And when you go to run the command instead of:

zcat /var/spool//mysqldump/randomdb.20020901.gz | extract-table Users > ~/Users.dump

Do this:

zcat /var/spool//mysqldump/randomdb.20020901.gz | extract-table "`Users`" > ~/Users.dump

Anonymous   
Printed Page 179
3rd textual paragraph

"takes the form database user password"
needs some type of punctuation or formatting to indicate this is a list. Possibly constant width italic for the 3-tuple (or commas between each item) and a colon after "form". (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 185
"See also" section, 3rd bullet point

"Linux Help.Net"
should have no space in the URL. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 187
2nd paragraph

"snippet from a Apache"
should be
"snippet from an Apache" (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 189
1st paragraph, last sentence

"log the information to it's access_log."
should be:
"log the information to its access_log."
"its" is possessive. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 190
3rd URL example before the 1st text paragraph

"track=nyt" URL example should be in bold face like the others. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 203
3rd last textual paragraph, 2nd sentence

"delivered by a script the takes"
should be:
"delivered by a script that takes" (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 204
1st paragraph, 2nd sentence

"it returns predictable contend (say, the default view of the first page of an article.)"
should be:
"it returns predictable content (say, the default view of the first page of an article)."
Two changes: "contend" to "content", and move the period outside the parenthesis. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 208
"See also" section, 2nd bullet point

"Proxy Server Hack" is mentioned but I can't find any such hack in the book, except perhaps #98. In any case, it should be formatted in brown/red color as with the hacks referenced below it. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 211
2nd paragraph, 1st sentence

"gateway for 12.34.56.78)."
Period should be inside the parenthesis. (3/03 printing)

tcordes  Jan 12, 2016 
Printed Page 219
upper right

the index entry for 'rcg' is mistakenly labelled 'rgc'

Anonymous