Archive for October, 2006

Other Websites Many people maintain websites dedicated to

Friday, October 27th, 2006

Mailing Lists You can find a variety of mailing lists dedicated to OpenBSD, run by both the official OpenBSD project and various third parties. We’ll discuss what lists exist and how to use them to best advantage. The Main Mailing Lists OpenBSD has quite a few mailing lists for public use. All mailing lists are accessible to the public. Some of the lists are a little more private than others, however. Each major hardware platform has a mailing list, but discussion on those lists is strictly limited to people who are either actively developing that platform or sending bug reports for that platform. They aren’t of much use to the average OpenBSD user, unless you’re tracking problems in a development version of OpenBSD. Here, we’re just going to cover the mailing lists that are useful for the average user. . : This is a very low-volume, moderated list that only has important news about the OpenBSD Project. This list receives at least one message every six months, when a new version of OpenBSD comes out. . : This mailing list contains security announcements for OpenBSD. When the OpenBSD team learns of a security flaw in OpenBSD, they post a notification and a fix to this mailing list. If you are running an OpenBSD machine plugged into the Internet, you must subscribe to this list. We’ll see more about this in Chapter 14. . : This list is for general OpenBSD discussion and user questions. While this is the “miscellaneous” list, it still has strict rules for acceptable messages. We’ll discuss how to usefully post to an OpenBSD mailing list later this chapter. . : This list is for in-depth technical discussions, such as code discussion and protocol analysis. This is a useful list to subscribe to, but you probably don’t want to post here unless you are a developer. As a good rule of thumb, if your post to doesn’t contain a code diff, you’re on the wrong mailing list. Subscribing to a Mailing List OpenBSD uses the Majordomo mailing list manager. To subscribe to a mailing list, send a message to containing the following: subscribe mailing-list-name For example, to subscribe to the misc list, you would send subscribe misc OpenBSD’s majordomo requires that all subscription requests be verified. You will receive a message of instructions back. Be sure to follow those instructions to complete your subscription! Other Official Lists If you want to become more deeply involved in the OpenBSD community, you might well wonder what other official OpenBSD mailing lists exist. The best way to learn about the lists that currently exist is to ask the mailserver; it’ll tell you. Just send a message to containing the single word: lists You will receive a reply giving the name of each OpenBSD mailing list and its purpose. Note If you want to learn more about the OpenBSD mailing list manager and what other information you can get, send the single word “help” to < majordomo@OpenBSD.org>. Page 28

Hint: This post is supported by Gama hrvatski web hosting services

Other Websites Many people maintain websites dedicated to

Friday, October 27th, 2006

Other Websites Many people maintain websites dedicated to OpenBSD, or related to OpenBSD, or generally useful to the OpenBSD Project. Any time you have a problem or are trying to understand something, check out these sites for more information. Read third-party documentation carefully and skeptically, however. Anyone can put up a website, and that person can say anything on that site. Tutorials and articles outside of the OpenBSD Project may contain erroneous information, or tutorials that only work in the author’s particular situation. Here are a few popular ones at the time I write this. . Google BSD (http://www.google.com/bsd/): The Google search engine is one of the most powerful support tools for OpenBSD or for any piece of software, actually. Google has indexed not only the main OpenBSD website, but also a variety of OpenBSD mailing list archives, third-party websites, and newsgroups. Google is your friend. If you ask someone for help, they will almost always point you to Google. Use it. . Monkey.org (http://www.monkey.org/openbsd/): This is one of the oldest OpenBSD sites, and a fair chunk of the material here is somewhat dated as of this writing. It contains searchable archives of the OpenBSD mailing lists, which are very valuable. We’ll discuss the mailing lists a little later. . Daemon News (http://www.daemonnews.org/): Daemon News provides a daily news board and monthly ezine devoted to all things BSD, including OpenBSD. Much of the information presented at Daemon News is quite applicable to OpenBSD. . BSD Forums (http://www.bsdforums.org/): BSD Forums indexes news stories about all sorts of BSD and hosts discussion threads about the articles. . The OpenBSD Journal (http://www.deadly.org/): This website contains articles, comments, and questions related to OpenBSD. It is an excellent resource for all things OpenBSD. . O’Reilly Network BSD Developer Center (http://www.onlamp.com/bsd/): This O’Reilly-sponsored site hosts a variety of OpenBSD and general BSD articles, including the column Big Scary Daemons by yours truly. Page 27

Hint: This post is supported by Gama hrvatski web hosting services

arc h”). Section Numbers and Man You might

Friday, October 27th, 2006

www.OpenBSD.org The OpenBSD website contains a variety of information useful for general OpenBSD administration, installation, and management. The most useful portions are the FAQ and the platform-specific hardware support documents, but the site as a whole contains much useful information. From the front page you see links describing how to access the source code, the CVS repository, the bug reporting system, and other documentation. Information is added regularly, so take a look, and see what they have! Website Mirrors Many people mirror the OpenBSD website across the world. In most cases, you can find a mirror for a country by using the format www.countrycode.OpenBSD.org. For example, the main British mirror is located at http://www.uk.OpenBSD.org/. There are many exceptions to this rule, however; for example, the main United States mirror is at http://www.usa.OpenBSD.org/. Other mirrors have completely different URLs. The website mirrors are linked off the bottom of the main OpenBSD website, and hence at the bottom of each mirror site. I recommend that you pick a mirror that responds quickly for you, and bookmark it. The mirror sites are generally underused, while the main site is quite heavily accessed. The OpenBSD FAQ The OpenBSD FAQ is the repository of frequently asked questions about OpenBSD. While much of the information in there is duplicated in the manual pages, the FAQ presents the knowledge in an easier-to-follow format. Unlike many other FAQs you might be familiar with, the OpenBSD FAQ includes extensive tutorial information. For example, Chapter 4 of the FAQ contains the full, detailed installation process. Other chapters discuss other features of the system or problems you may encounter. If you’re having a problem, or want to know how some major port of OpenBSD works, definitely check the FAQ! Page 26
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

arc h”). Section Numbers and Man You might

Friday, October 27th, 2006

arc h”). Section Numbers and Man You might find cases where the man page you want has the same name as a man page in some other section of the manual, especially as you add additional software to your OpenBSD machines. In those cases, specifying the section number is the only way to get the exact page you want. Without giving a section number, you’ll get the man page of that name with the lowest section number. You can specify a section number before the name of the command, i.e.: # man 8 ping While this example is rather trivial (a “ping” man page only appears in one section of the manual), we’ll look in some other cases where it isn’t. Man Page Contents Man pages have a variety of section headers. While just about any subsection can appear in a man page, several are standard. (See mdoc(7) for a partial list of standard section names, as well as other man page standards.) Like book authors, man page authors try to arrange their content in a manner that makes sense for the program they’re describing. Still, you will see some standard headings. . NAME tells you the names of a program or utility. Some programs have multiple names for example, the vi(1) text editor is also available as view(1) or ex(1). The man page lists all of these names. . SYNOPSIS lists the possible command-line options and their arguments, or how a library call is accessed. Frequently, you’ll find that this header is enough to spark your memory and remind you of a flag you’ve used before that caused the program to behave appropriately. . DESCRIPTION contains a brief synopsis of the program or feature. The contents of this section vary depending on the topic, as programs, files, and interfaces all have very different documentation requirements. . OPTIONS describes a program’s command-line options and their effects. . BUGS describes known failure conditions, weird behavior, and how to make the program fail in general. This is a great time-saver. Many times I’ve had a problem with a command only to find that behavior, and sometimes a workaround, listed in the BUGS section. Honesty is a wonderful thing in computing products. . SEE ALSO is traditionally the last section in a man page. OpenBSD is an interrelated whole; every command has ties to other commands. In an ideal world you would read every man page and be able to hold an integrated image of the system in your head. Because most of us cannot do that, this section provides directions to related man pages. You now know what you need to navigate the integrated help system. Now let’s look at some information resources elsewhere than your computer. Man Pages on the Web The manual pages are also available on www.OpenBSD.org and its mirrors. While your system has only the man pages for your release and architecture of OpenBSD, the manual available on the website includes all previous versions of OpenBSD and all architectures. If you want to see differences in the boot process between i386 and Alpha platforms, you can easily compare the manual pages on the website. Similarly, you can see which release certain commands were first documented in and how those commands have changed over time. Page 25
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

SYNOPSIS ping [-DdfLnqRrv] [-c count] [-I ifaddr] [-i

Friday, October 27th, 2006

much irrelevant information. A similar search with whatis(1) gives the following. # whatis ping ping (8) - send ICMP ECHO_REQUEST packets to network hosts # That’s more like it! You may find that such a narrow search isn’t enough for some terms, however. Experiment with apropos(1) and whatis(1) until you’re comfortable with them, and you should be able to find just about any topic you like. Between the search functions, and the SEE ALSO sections within man pages (see “Man Page Contents”), you can generally find the information you need. No Th te e apr op os co m ma nd is the sa me as “m an -k” (for “ke yw ord se arc h”), an d the wh ati s co m ma nd is the sa me as “m an -f” (for “ful l wor d se Page 24

Hint: This post is supported by Gama besplatan domen provider

SYNOPSIS ping [-DdfLnqRrv] [-c count] [-I ifaddr] [-i

Friday, October 27th, 2006

SYNOPSIS ping [-DdfLnqRrv] [-c count] [-I ifaddr] [-i wait] [-l preload] [-p pattern] [-s packetsize] [-t ttl] [-w maxwait] host DESCRIPTION ping uses the ICMP protocol’s mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_REPLY from a host or gateway. ECHO_REQUEST datagrams (“pings'’) have an IP and ICMP header, followed by a “struct timeval'’ and then an arbitrary number of “pad'’ bytes used to fill out the pack et. The options are as follows: -c count Stop after sending count ECHO_REQUEST packets. -D Set the Don’t Fragment bit. -d Set the SO_DEBUG option on the socket being used. You can now learn huge amounts about pinging hosts on the Internet, just by understanding this document. If you need more information, you can look at some of the other man pages referenced by ping(8) to build an in-depth picture of the system. Navigating Man Pages Once you’re in a man page, hitting the space bar will take you forward one full screen. If you don’t want to go that far, hitting the ENTER key will scroll down one line. If you go to far, and want to back up, hitting “b” will take you back one screen. To search within a man page for a word, type / followed by the word. You’ll jump down to the first appearance of that word. Typing n subsequently will jump you to the next occurrence of that word. This assumes that you’re using the default OpenBSD pager, more(1). If you’re using a different pager, you’ll have to use the syntax that pager requires. If you don’t know what a pager is, then don’t worry about it. Finding Man Pages One frequent complaint about man pages is that it’s difficult to find a man page that covers a topic you’re interested in. There’s certainly truth to this many OpenBSD questions can be answered by a simple “read man such-and-such.” The problem is finding the correct such-and-such for what you want to know. You can perform basic keyword searches with apropos(1) and whatis(1). Apropos(1) searches for any man page name or description that includes the word you’re interested in. Whatis(1) only matches whole words. For example, if you are interested in the ping command, you might try: # apropos ping Net::Ping (3p) - check a remote host for reachability Text::Wrap (3p) - line wrapping to form simple paragraphs boot (8/Alpha) - Alpha system bootstrapping procedures boot (8/Amiga) - amiga-specific system bootstrapping procedures … Well, the first command looks somewhat like the standard ping command, but it’s in section 3p of the manual it’s a Perl library! The next three matches have nothing to do with ping, but if you examine them closely you’ll see that the letters “ping” appear in each of them, encapsulated within the words “wrapping” and “bootstrapping.” Depending on the term you’re looking for, apropos can give you far too Page 23

Hint: This post is supported by Gama besplatan domen provider

“The Code Is Fine; What’s Wrong with You?”

Thursday, October 26th, 2006

Man Pages Man pages, short for “manual,” are the original way of presenting UNIX documentation. While man pages have a reputation for being obtuse, difficult to read, or incomplete, the OpenBSD manual pages are quite informative. The OpenBSD team considers man pages to be the final word in system documentation. They are expected to be correct. Errors in man pages are considered serious bugs and are dealt with as quickly as possible and as forcefully as necessary. As such, you can expect that the man page will be correct and complete. Man pages should be your first line of attack in learning how something works. A man page is not a tutorial. It explains how something works, not what to type to make particular effects happen. You need to be able to assemble the pieces given by the man page into the tool that you want. If you want a tutorial you need to look at the FAQ, articles on third-party websites, and this book. If you find a tutorial that does exactly what you want, be sure to understand what you’re doing as well as what you’re typing; otherwise, you’ll be stuck when something breaks. Manual Sections The OpenBSD manual is divided into nine sections. Each man page appears in only one section. These sections are sometimes called volumes, a relic of the day when the manual was small enough to realistically be printed and distributed. Roughly speaking, these sections are: 1 General Commands 2 System Calls and Error Numbers 3 C Libraries 3p Perl Libraries 4 Devices and Device Drivers 5 File Formats and Configuration Files 6 Game Instructions 7 Miscellaneous Information 8 System Maintenance Commands 9 Kernel Internals When reading man pages, you’ll usually see the section number in parenthesis after the command, like this: panic(9). This represents both the name of the command, library, or interface (panic) and the section where the man page for that can be found (9). When you see something in this format, you can check the man page for detailed information. Almost every topic has a man page. Some commands or topics have multiple man pages of the same name, in different sections. You can view man pages with man(1). If you know the section number, give it and then the name of the program. For example, to see the manual page for the standard network utility ping(8), enter: # man ping In response, you should see something like this: PING(8) OpenBSD System Manager’s Manual PING(8) NAME ping - send ICMP ECHO_REQUEST packets to network hosts Page 22

Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Virtualwebstudio tomcat web hosting provider

“The Code Is Fine; What’s Wrong with You?”

Thursday, October 26th, 2006

“The Code Is Fine; What’s Wrong with You?” In most cases, people do not have problems with OpenBSD itself. The software runs, and it runs well. Most problems people have with OpenBSD come from their own understanding, or lack thereof. When a program behaves unexpectedly, you probably have a gap in your own comprehension of how things work. Your goal in resolving problems should be to improve your knowledge so you can make the system behave, as you require. Other people make OpenBSD work correctly, and you can too. You might find that a problem is quite real, however. You might uncover a bug in OpenBSD, or learn that you have bad hardware, or discover that a third-party tool really does crash under particular circumstances. You cannot be certain you’ve found a bug until you understand correct behavior not just how you think the system works, but how it really does work. You must learn how the system should behave and why, so you can identify real bugs when you find them. For example, before writing This Blog I had never used an OpenBSD machine to display a serial console. All of my UNIX boxes are hooked up to a rusty old Livingston terminal server. Most people aren’t stuck with that many serial consoles, however, and want to use a null modem cable between two OpenBSD machines and have each serve as the terminal for the other’s console. (We cover serial consoles in Chapter 6.) From reading the manual page, it seemed simple enough; once the cable is attached and the test machine is configured to dump its console out the serial port, become root on your display machine and type “tip tty00,” and the other machine’s console should appear in the terminal window. This didn’t work. The question then became, “Am I doing it wrong, or is something wrong with my hardware, or is there a bug in OpenBSD?” Swapping systems around showed that the command worked on other OpenBSD machines, just not on this test box. Further tests with a serial mouse and a modem showed that the serial port on the test machine was bad. I originally planned to do all of the tests for This Blog on a Pentium 166 to make the point that OpenBSD works well on older hardware [1], but wound up purchasing a brand-new AMD 1800 instead. Had the serial port not been bad, and if I had taken the correct steps, I might have actually found an OpenBSD bug. Once you have confirmed that an actual bug exists, and have narrowed down the bug to a precise problem, be sure to notify the OpenBSD development team with sendbug(1). A good bug report includes all possible information about the problem, a description of the problem, a way to replicate the problem on other systems, and a suggested fix with source code. OpenBSD has three main information sources: man pages, websites, and mailing lists. To understand why your system behaves a certain way in particular circumstances, you may need to check all three. [1]That point has now become, “OpenBSD runs well on older hardware that hasn’t been burned out after years of abuse.” Page 21

Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Virtualwebstudio tomcat web hosting provider

Chapter 1: Additional Help Overview Countless documents: man

Thursday, October 26th, 2006

OpenBSD Community Support If you have only worked with commercial UNIX before, you might find OpenBSD’s support process a little surprising. There is no toll-free number to call and no vendor to escalate within. No, you may not speak to a manager. There isn’t one. And there’s a good reason for that; the management is you. Commercial operating systems, such as those provided by Microsoft, conceal their inner workings. The only access you have to the operating system is the options presented by the GUI, plus a few command-line tools that are almost an afterthought. If you want to learn more about how your operating system works, you cannot. When something breaks, you can either live with it or make offerings to the vendor to make the problem go away. Even if you do pay for help, the people on the other end of the phone frequently know little more than you do. OpenBSD, on the other hand, is completely open. You can view the source code. You can view object code, if you want to. You have manual pages, and FAQs, and all sorts of instructions and documentation that enable you to help yourself. You also have access to the CVS logs via the Web and via CVS itself. These logs describe every change that has ever been made to every part of the system so you can back out changes, understand the motivations behind changes, and even contact the people who have most recently updated the component you’re interested in and ask them why a particular change was made. You have the opportunity to learn about the operating system in exquisite, excruciating detail. The OpenBSD developers have gone to a lot of trouble to answer basic questions for you in their existing documentation and they expect you to use it. If you want to learn about OpenBSD, you need to make the jump from eating what you’re served to reading the cookbook and creating your own dinner. If you’re willing to learn from what is provided, you will develop skills both in solving problems and in OpenBSD, and you’ll make some friends in the OpenBSD community in the process. If you want to use OpenBSD and don’t have the time or inclination to learn, invest in a commercial support contract. Many different vendors support OpenBSD; check the OpenBSD website for details. If you aren’t interested in learning or buying a support contract, then OpenBSD is simply not for you. Page 20
Note: If you are looking for inexpensive but high quality provider to host and run your jsp application check Astra jsp hosting services

Chapter 1: Additional Help Overview Countless documents: man

Thursday, October 26th, 2006

Chapter 1: Additional Help Overview Countless documents: man pages, web, and HOWTOs: If you can find them. So, now that you’ve bought This Blog, you might think that you possess all the information you will ever need about OpenBSD. You hold in your hands the ultimate repository of all OpenBSD wisdom and acumen, and once you master its contents you will be lord and master of all that OpenBSD has to offer. Right? Sorry, no. Even if you could find a book prepared by someone with a thorough and total mastery of OpenBSD, he could not possibly cover everything there is to know in a single book. OpenBSD may be less than a decade old, but UNIX has been kicking around the block for 30 years. BSD has been around for 25 years. OpenBSD builds on three decades of tradition, knowledge, and power. You won’t master it with any single book. You might master it with a room full of books and a few years time, if you give up trivial things like friendship and bathing in favor of study. (Actually, if you give up bathing, friendship will give itself up.) The OpenBSD community maintains a wide variety of information sources. Some are integrated with OpenBSD itself, such as the man pages. The OpenBSD Project, such as the main OpenBSD website and the various mailing lists hosted at OpenBSD.org, maintains others. Still more users and devotees of OpenBSD maintain other websites, mailing lists, and documentation projects. The flood of available information can be overwhelming to experienced users, let alone new users. The goal of this chapter is to take you by the hand and lead you through some of it. Page 19
Note: If you are looking for inexpensive but high quality provider to host and run your jsp application check Astra jsp hosting services