BSD Hacks

Errata for BSD 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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page xi
1st hack attribution

Michael Vince should be attributed to hack #66, not #64 as listed.

Anonymous    May 17, 2013
Printed
Page 5
"Silencing Auto-Complete" 2nd paragraph

a prompt missing. ls -l b should be: % ls -l b

Anonymous    May 17, 2013
Printed
Page 6
example after 3rd paragraph

The setting of prompt is defined in the example as follows: dru@~:grep prompt ~/.cshrc if ($?prompt) then set prompt = "%B%n@%~%b: " I.e., a space should be inserted between the last ":" and the text user will enter. However, in the examples in [Hack #2] and [Hack "3], no space is inserted. A space should be inserted after ":". I.e., dru@~:grep prompt ~/.cshrc should become dru@~: grep prompt ~/.cshrc

Anonymous    May 17, 2013
Printed
Page 15
2nd paragraph from bottom

The command: % xbindkeys --defaults ~/.xbindkeysrc should be: % xbindkeys --defaults > ~/.xbindkeysrc

Anonymous    May 17, 2013
Printed
Page 23
2nd paragraph from the bottom

set autologout = (30 15) This particular setting will log out a user after 15 minutes of inactivity. ^^^^^^^^^^^^^ The portion "log out a user" should be "lock the screen" because the second parameter is 15.

Anonymous    May 17, 2013
Printed
Page 24
See Also of Hack #7

The second line of See Also looks: man tcsh man idled These should be separated into two lines.

Anonymous    May 17, 2013
Printed
Page 27
5th line from the bottom

The example to remove files from trash should not be: % m /trash/* instead, it should be: % m ~/.trash/*

Anonymous    May 17, 2013
Printed
Page 31
2nd line from the bottom

The next two files work hand in hand and customize the behavior of man mail. Should be: The next two files work hand in hand and customize the behavior of mail.

Anonymous    May 17, 2013
Printed
Page 34
2nd and 1st paragraphs from the bottom

The FILES=1 and FILES=2 in each paragraph should be FILES1 and FILES2 respectively

Anonymous    May 17, 2013
Printed
Page 45
"Multitasking with Screen"

-s should be -S. It occurs twice on page 45, once in a listing and once in the paragraph before the listing.

Anonymous    May 17, 2013
Printed
Page 66
last line

print """Change text file delimiters. (The book is missing several lines of documentation and the closing triple quote.) it should say: print """Change text file delimiters. This script copies a text file that is space delimited with text values in double quotation marks to a new, tab delimited file without the double quotation marks. The advantage of using this script is that it leaves spaces that were within double quotes unchanged. There are no command line arguments for this script. The script will prompt the user for source and destination file information. You can redefine the variables for the original and new delimiters, delim and new_delim, in the script as needed."""

Anonymous   
Printed
Page 67
7th line

The comment: #The variable 'm' acts as a text/non-text switch that reminds python should be: #The variable 'tswitch' acts as a text/non-text switch that reminds python Also, in the middle of the page; the 4 occurances of "==" there should be no space between the "=". ----- The correct code, in its entirety, is below: #!/usr/local/bin/python import os print """ Change text file delimiters. This script copies a text file that is space delimited with text values in double quotation marks to a new, tab delimited file without the double quotation marks. The advantage of using this script is that it leaves spaces that were within double quotes unchanged. There are no command line arguments for this script. The script will prompt the user for source and destination file information. You can redefine the variables for the original and new delimiters, delim and new_delim, in the script as needed.""" # Ask user for source and target files. sourcefile = raw_input('Please enter the path and name of the source file:') targetfile = raw_input('Please enter the path and name of the target file:') # Open files for reading and writing. source = open(sourcefile,'r') dest = open(targetfile,'w') # The variable 'tswitch' acts as a text/non-text switch that reminds python # whether it is working within a text or non-text data field. tswitch = 1 # If the source delimiter that you want to change is not a space, # redefine the variable delim in the next line. delim = ' ' # If the new delimiter that you want to change is not a tab, # redefine the variable new_delim in the next line. new_delim = ' ' for charn in source.read(): if tswitch == 1: if charn == delim: dest.write(new_delim) elif charn == '"': tswitch = tswitch * -1 else: dest.write(charn) elif tswitch == -1: if charn == '"': tswitch = tswitch * -1 else: dest.write(charn) source.close() dest.close()

Anonymous    May 17, 2013
Printed
Page 76
Note

"Even though nbtstat ? indicates..." should be: "Even though nbtstat /? indicates..."

Anonymous    May 17, 2013
Printed
Page 79
last word, first line in the paragraph before

daily_clean_tmps: change /var/log/messages.1.bz2 to /var/log/messages.0.bz2

Anonymous    May 17, 2013
Printed
Page 80
The last line of page 80

.... see (ex)1 The "(ex)1" should be "ex(1)".

Anonymous    May 17, 2013
Printed
Page 84
about half way down the page

Change: md /tmp mfs rw,-s64m i 2 0 ... to: md /tmp mfs rw,-s64m i 0 0

Anonymous    May 17, 2013
Printed
Page 109

The 2 syslogd lines in "Setting Up the Logging Server" should read: syslogd_enable="YES" syslogd_flags="-ss"

Anonymous    May 17, 2013
Printed
Page 114
example after 1st paragraph

The 5th line of this output example is: I'm a node in cyberspace. Who are you? ^ but, the setting example found at the 9th line from the bottom of previous page 113 is: ... I'm a node in Cyberspace. ... ^

Anonymous    May 17, 2013
Printed
Page 136
1st - 2nd line from the bottom

We briefly saw this file in "Customize the Default Boot Menu" [Hack #24] when we ... should be: We briefly saw this file in "Protect the Boot Process" [Hack #25] when we ...

Anonymous    May 17, 2013
Printed
Page 139
1st paragraph of section "/etc/login.conf"

I read: ... in our old friend /etc/login.conf [Hack #30] but, /etc/login.conf is seen in [Hack #29], not in #30. 152: "% sshd -l rembackup 10.0.0.1" should be: "% ssh -l rembackup 10.0.0.1"

Anonymous    May 17, 2013
Printed
Page 174
1st paragraph of section "Spoofing on NetBSD"

It says that Dheeraj Reddy's ifconfig patch is available from http://news.gw.com/netbsd.tech.net/%3C20030808072355.GA616%40bharati.sudheeraj.net%3E, but this URL no longer exists. I find this patch is available from http://mail-index.netbsd.org/tech-net/2003/08/08/0001.html

Anonymous    May 17, 2013
Printed
Page 174
3rd line from the bottom of the page

The example command of applying patch is shown as follows: # patch > ifconfig.patch it should be: # patch < ifconfig.patch

Anonymous    May 17, 2013
Printed
Page 178
1st - 2nd line of "shome" section of the example code

It reads: ifconfig ${NIC} inet 192.168.1.21 ssid "myhome" authmode "shared" nwkey 0x123456789a netmask 255.255.255.0 The second line is continued from the first line since "nwkey" is option of ifconfig command. Therefore, "" is necessary at the end of the first line.

Anonymous    May 17, 2013
Printed
Page 185
6th paragraph

I read: You can also fine-tune that syntax to unidirectional traffic like so: # tcpdump -i ed0 src host genisis and dst host server1 That will show only the traffic that was created at genesis and ... ^^^^^^^ This "genesis" should be "genisis"

Anonymous    May 17, 2013
Printed
Page 203
fourth line

instead of # make restart-msp it should be # make restart-mspq

Anonymous    May 17, 2013
Printed
Page 213
last paragraph

Change the last paragraph and listing on p. 213 to: Set an environment variable to tell ClusterIt where to find the list of hosts, and set two more to specify ssh as the tool to start remote shells and terminals. Run this from the tcsh command line or add the commands to your ~/.cshrc: setenv CLUSTER ~/.cluster setenv RCMD_CMD ssh setenv RLOGIN_CMD ssh

Anonymous    May 17, 2013
Printed
Page 240
2nd paragraph of Hack #58

I read: ... you already have the mtree utility [Hack #54] but, mtree is explained in Hack #22.

Anonymous    May 17, 2013
Printed
Page 246
last paragraph

# /usr/local/ports/security/snort Should be # /usr/ports/security/snort

Anonymous    May 17, 2013
Printed
Page 248
4th paragraph

/usr/local/etc/apache/httpd-conf should be /usr/local/etc/apache/httpd.conf

Anonymous    May 17, 2013
Printed
Page 258
last paragraph

(make sure the directory /etc/cgd exists and is mode 600): should be (make sure the directory /etc/cgd exists and is mode 700):

Anonymous    May 17, 2013
Printed
Page 261
4th item of "See Also" in Hack #60

It reads: The Encrypting Disk Partitions (using gdbe) section of the FreeBSD Handbook it should be: The Encrypting Disk Partitions (using gbde) section of the FreeBSD Handbook

Anonymous    May 17, 2013
Printed
Page 266
last paragraph

Both paths in the last paragraph should be changed. it should be: ...renaming /usr/local/etc/rc.d/sudoscriptd.sh.sample to /usr/local/etc/rc.d/sudoscriptd.sh.

Anonymous    May 17, 2013
Printed
Page 270
3rd paragraph

I read: .... if you're using rsnapshot for backups [Hack #35] But, rsnapshot was explained in Hack 39, instead of Hack #35.

Anonymous    May 17, 2013
Printed
Page 280
Example Usage

The script list my three Ethernet cards, rl0, xl0 and rl0 should be: The script list my three Ethernet cards, rl0, xl0 and rl1

Anonymous    May 17, 2013
Printed
Page 284
4th code block (3rd full code block)

/.quickpatch.pl should be: ./quickpatch.pl

Anonymous    May 17, 2013
Printed
Page 290
last line

The last line introduces the URL for ClamAV is http://clamav.elektrapro.com/ It has changed to: http://www.clamav.net/

Anonymous    May 17, 2013
Printed
Page 308
1st paragraph of section "Using the Live Filesystem"

The introduced ftp path: ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES/5.1-RELEASE/ is now seems to be changed to: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/5.1/

Anonymous    May 17, 2013
Printed
Page 313
1st - 2nd line

The introduced URL for Netcat web site http://www.atstake.com/research/tools/network_utilities does not exist now. Instead, I think following is the appropriate URL http://netcat.sourceforge.net/

Anonymous    May 17, 2013
Printed
Page 341

fastest-cvsup should be fastest_cvsup in both the listing and the paragraph that occurs before the listing.

Anonymous    May 17, 2013
Printed
Page 343
n the script under echo "Updating docs"

"cd /usr/ports" should be "cd /usr/doc" Note that the "cd /usr/ports" IS correct under echo "Updating ports index"

Anonymous    May 17, 2013
Printed
Page 348-349
cvs checkout command

Please remove the -l from the "cvs checkout" command on pages 348-349.

Anonymous    May 17, 2013
Printed
Page 352
2nd paragraph and more in this page

The four file names ".ctm-status" in this page should be replaced with ".ctm_status".

Anonymous    May 17, 2013
Printed
Page 376
2nd paragraph, last line

SH. NAME should be: .SH NAME

Anonymous    May 17, 2013
Printed
Page 390
4th paragraph

The word "psuedoterminal" should be "pseudoterminal".

Anonymous    May 17, 2013
Printed
Page 392
2nd paragraph

According to the output of lastcom above this 2nd paragraph, the user name dlavigne6 should be dlavigne.

Anonymous    May 17, 2013
Printed
Page 396
last example

% grep -wi 't...k...r' /usr/share/dict/words/ should be: % grep -wi 't...k...r' /usr/share/dict/words

Anonymous    May 17, 2013
Printed
Page 400
6th paragraph

The following URL is introduced to download Latte Diablo JRE 1.3.1: http://www.freebsdfoundation.org/cgi-bin/download.cgi?package=diablo-jre-1.3.1-0.tar.bz2 it should be: http://www.freebsdfoundation.org/cgi-bin/download.cgi?package=diablo-jre-1.3.1.0.tgz

Anonymous    May 17, 2013
Printed
Page 405
2nd paragraph

"tail -f -b=1m ports.tar.gz | tar -zvxf ports.tar.gz" should be "tail -f -b 2048 ports.tar.gz | tar -zvxf -".

Anonymous    May 17, 2013