When you’re evaluating netbooks, you have to weigh the convenience of their small form factor against a variety of limitations. Erik Eckel explains several key considerations that will help you find a suitable middle ground.
Who saw this coming? In the day and age of quad-core CPUs, 17-inch laptop displays, and terabyte hard disks, who’d have thought small laptops with slow CPUs and little storage would set the world afire. But that’s just what’s happened.
Wired magazine took note in its February article, in which it said that netbooks “violate all the laws of the computer hardware business.” These small computers, designed mainly for e-mail and Internet use, are not potent systems. With smaller and slower hard disks, little RAM, energy-sipping processors, tiny keyboards, and inexpensive price tags, netbooks can’t even run many mainline applications (such as graphics arts programs, audio/video editing applications, and numerous 3D games).
Yet manufacturers are discovering that many users don’t care. Sales are up, and the category’s hot, with companies tripping over themselves to introduce new netbook models.
Why? Many users seek simple devices they can use to access the Internet, send and receive e-mail, and edit basic office documents and spreadsheets. That’s it. They don’t need expensive features they’ll never really need or use. They just want access to the much heralded “cloud.”
However, not every netbook is right for every user. Before you join the ranks of 8.9-inch, 1.33GHz-CPU, 1GB-RAM netbook users, here are 10 elements to consider.
Note: This article is also available as a PDF download.
1: Operating system
To cut costs and enable aggressive pricing, many netbooks are powered by Linux. Stable and reliable, Linux is also less expensive than Windows. With many netbooks selling for $400 or less, and OEM copies of Windows XP still selling for approximately $100 or more, it’s easy to see how many manufacturers are tempted to pad margins by replacing Windows with Linux.
Further, many of the netbook models featuring Windows have XP Home builds. Those systems can’t host remote connections using Microsoft’s Remote Desktop Connection technology, nor can they properly join Windows server-powered domains, as can Windows XP Professional and Windows Vista Business systems.
2: Display size
Netbooks are designed to be small, lightweight, and portable. One significant tradeoff is screen size. Many of the most popular models feature only seven- or nine-inch screens. Your best bet, before committing to a purchase, is to test using a sample or evaluation unit at a local retailer. Otherwise, you may be underwhelmed when such a small box arrives in the mail.
Many users find ~nine-inch displays the smallest they can comfortably use. Dell’s Inspiron Mini 9- and Asus’ Eee PC 8.9-inch screens, for example, support 1024×600 resolution. While that doesn’t match the 1024×768 resolution that has essentially become the de facto standard for PCs, it’s a tolerable exchange for portability and convenience.
3: Battery life
Netbooks grew from initiatives to build simple laptops that could be used by children in developing countries. As a result, these systems have an energy-conscious heritage, which is doubly important considering most netbooks are used away from homes and offices.
Due to differences in batteries, CPUs, hard disks (solid state versus traditional hard disk drives), and display technologies, battery life varies widely by manufacturer and model. For example, Asus Eee PC 1000HE users can receive as many as five hours of service from a single charge, whereas Wired tests found the HP Mini 2140 lasted only 2.5 hours.
4: Keyboard and pointer buttons
Small is the resounding netbook theme, and that applies to keyboards and track pad options, too. Don’t expect systems with 8.9-inch displays to include full-size keyboards. Keys can actually prove alarmingly small (yet another reason you should test a potential new purchase before buying).
When trying to stuff critical features inside small footprints, designers’ pointer (integrated track pad) options are limited. Most leading netbook brands (Acer, Asus, Dell, HP, Lenovo, and MSI Wind) feature reasonably sized, well-working track pads. Don’t assume, though, that all models’ pointer options or selection buttons are well-designed. Be sure to review a netbook’s pointer configuration carefully to make sure it meets your preferences.
5: Storage space
Many users are accustomed to 80GB, 160GB, or even 250GB notebook hard drives these days. With such vast storage capacity, they haven’t had to limit the number of songs, graphic files, and videos they store on their personal computers. But netbooks are different. Some leading styles include only 16GB solid state drives that, once Windows is loaded, don’t leave acres of space for file storage. Consider your needs and plan accordingly.
Netbook analysis and reviews
* Are netbooks quietly driving us to thin clients and cloud computing?
* Three reasons to pause before deploying netbooks in business
* Product Spotlight reviews:
Lenovo S10 netbook
HP Mini 2140 Notebook PC
Acer Aspire One
ASUS N10 ultraportable notebook
Eee PC 900 netbook running Eeebuntu
6: Optical drive
Remember how a netbook’s theme is small and portable? One of the casualties of the low-cost/lightweight/small form factor profile is the loss of the optical drive. Most netbooks don’t have a CD-ROM or DVD drive. Instead, users must purchase a standalone USB optical drive or transfer CD or DVD images to flash memory drives or over a network to install software on a netbook.
7: Weight
Portability is the key with netbooks. Many of the most popular 8.9-inch display models weigh only two-and-a-half pounds or so. But some may sneak up on you. Rethink machines weighing more than three pounds — too many sub three-pound options are available for you to settle for needless deadweight.
8: Expansion capacity
Many users, when not traveling, want to leverage their netbook as another office system. Some netbooks are more cooperative than others. Review the specifications of the models you’re considering to verify that they have sufficient USB ports and the appropriate video and network connections for your needs.
9: CPU
Don’t be distressed when you review a netbook’s technical specs. The CPU details are not misprints. While your desktop PC may boast a 2.83GHz quad-core CPU, netbooks are anemic by comparison.
The Intel Atom is often the CPU of choice. The Z520 (1.33GHz) and Z530 (1.60GHz) CPUs are among the most popular. Although these chips can’t power demanding graphic editing programs, most 3D games, or engineering applications, they’re more than adequate for accessing e-mail, surfing the Internet, and reviewing and editing most documents, spreadsheets, and presentations.
When reviewing CPU specifications, keep in mind that faster-running chips typically diminish battery life. Thus, it’s a never-ending tradeoff: performance versus battery service.
10: Integrated wireless options
If netbooks are to connect you to the cloud, they must have wireless connectivity. Any more, that doesn’t just mean connecting to 802.11g Wi-Fi networks. Many users require 802.11n or Bluetooth connectivity, while still others need their netbooks to connect to cellular networks.
Fortunately, netbook manufacturers are paying attention. Most leading brands include Bluetooth connectivity, at least as an optional component. Still others offer customers the choice of adding integrated cellular mobile broadband adapters.
If these options are important to you, hold out for a model that has the proper wireless options. The alternative is to become dependent upon a bulky dongle, and that’s quickly become old-fashioned.
Finally: 10 Things… the newsletter!
Get the key facts on a wide range of technologies, techniques, strategies, and skills with the help of the concise need-to-know lists featured in TechRepublic’s 10 Things newsletter, delivered every Friday
Wednesday, April 22
Thursday, April 16
another FreeBSD postfix
Contents
* Introduction
* Resources
* Installing postfix from cvs
* Post-Installation Requirements for postfix
* Configuring postfix as a Null Client
* Starting and Testing postfix
Introduction
The previous articles in this series have got you as far as installing perl-5.8 from source, and now we're ready to do some serious work. So why do we need to install an email system on the server first?
Your server is going to run headless which means you don't use it for everyday stuff. You don't need a keyboard, mouse, or display to control it, because that's happening though the ssh interface via PuTTY. In fact, your server is going to sit in a closet and you won't even know it's there.
Which brings us back to email. Your server is going to email you stuff like security reports and daily system checks. Once you get the bug tracker installed, it's going to email team members bug reports and other useful information.
So why not stick with the default sendmail system that ships with FreeBSD? After all, it reportedly handles about 50% of the Internet's email. The reason is that a casual system administrator (you) has little or no chance of really understanding the arcane syntax of the sendamil config file(s). So we're not even going to try. We're going to use postfix instead.
In this article, we'll get postfix installed from source, and learn a bit about figuring out build dependencies. I'll show you how to set up the mailer as a null client, which means it does not receive or route any local mail. It just sends mail to your local mail host or directly to the Internet.
Resources
The postfix program has a wide following, so natuarally it has its own web site with an excellent summary of existing .
The O'Reilly OnLamp website also has a decent article on basic installation and configuration.
For those that really want to dig deep on the internals of postfix, there is the obligatory O'Relly postfix book.
Installing postfix from cvs
Installing postfix from source is relatively straightforward. The first thing to do is figure out if the port requires any other libraries or applications. This is relatively easy if you use the FreeBSD Posts Search page to look for ports with "postfix" in the package name. Here's clickable query link...
http://www.freebsd.org/cgi/ports.cgi?query=postfix&stype=name
We're lucky here, there aren't too many packages with "postfix" in the name. A quick look at the list tells us that the available ports are:
* postfix-2.2.20040504 - which is really called postfix-current
* postfix-2.1.4 - which is really called postfix
Depending on how risk averse you are, I'd pick postfix over postfix-current, unless you absolutely need the latest bleeding edge updates - and for our system, I'm not sure we do.
Either way, have a look at the "Requires" line for the port, and you'll see that pcre-4.5 is needed to build and run postfix. Click on the link for pcre-4.5 and you'll see that it's in the devel category. And it looks like pcre-4.5 has a requirement for libtool-1.5.6_1 which is also in the devel category.
In short, postfix has the following dependencies:
mail/postfix
+- devel/pcre
+- devel/libtool15
Remember that you figure out the download name of the port by clicking on the "Description" link and checking the title of the page you end up on. After a while, you'll figure out that you can just hover the mouse over the "Description" link and get the name from the status bar of your browser.
Now we have enough information to go and get the relevant port files to build postfix. Here are the commands I used to get postfix, as root of course.
setenv CVSROOT :pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs
cd /usr
cvs login
cvs checkout -A -P -r RELEASE_4_10_0 ports/devel/libtool15
cvs checkout -A -P -r RELEASE_4_10_0 ports/devel/pcre
cvs checkout -A -P -r RELEASE_4_10_0 ports/mail/postfix
cvs logout
Building postfix is now simply a matter of:
cd /usr/ports/mail/postfix
make install
The postfix install script is interactive. Don't change anything and just tab over to the "OK" and hit return to accept all the defaults. As the build porgresses, you may (depending on how long ago this was written) see the following scary looking bit of output:
===> postfix-2.0.19,1 depends on shared library: pcre.0 - not found
===> Verifying install for pcre.0 in /usr/ports/devel/pcre
===> pcre-4.5 is marked as broken: unknown LIBTOOL version: 14.
Don't panic. It's just telling us we actually need libtool14 instead of libtool15. So all we need to do is download that port, like this:
setenv CVSROOT :pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs
cd /usr
cvs login
cvs checkout -A -P -r RELEASE_4_10_0 ports/devel/libtool14
cvs logout
and restart the build...
cd /usr/ports/postfix
make install
A little while later, you'll get the following prompts if everything goes well:
Would you like to activate Postfix in /etc/mail/mailer.conf [n]?
Answer "y" and hit Enter. Then you'll see this prompt:
You need user "postfix" added to group "mail".
Would you like me to add it [y]?
Again, answer "y" and hit Enter. That's all the interactive stuff until the installation is complete.
Post-Installation Requirements for postfix
Assuming postfix installed well, and that everything worked, now we need to do some post-install configuration before going much further.
Here's a copy of some important information that scolls by near the the end of the install procedure. I've broken down into useful chunks for discussion...
If you have postfix configured in your /etc/mail/mailer.conf (answered yes to
the previous question) and would like to enable postfix to start at boot time,
please set these variables in your /etc/rc.conf file:
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
This will disable Sendmail completely.
Alternatively to the above settings, you can enable postfix to start with
the other local services, for example, after your database server starts if
you need it to be running for postfix. To do this, set in your rc.conf file:
sendmail_enable="NONE"
Then make the following symbolic link:
cd /usr/local/etc/rc.d
ln -s /usr/local/sbin/postfix postfix.sh
For my installation, I copied the first set of variables and pasted them into my /etc/rc.conf file.
Also, you will want to disable some Sendmail-specific daily maintenance
routines in your /etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
This turned out ot be unnecessary as there is no /etc/periodic.conf file yet on our minimal server, and besides, we disabled sendmail as part of the initial installation of FreeBSD.
If you are using SASL, you need to make sure that postfix has access to read
the sasldb file. This is accomplished by adding postfix to group mail and
making the /usr/local/etc/sasldb* file(s) readable by group mail (this should
be the default for new installs).
We're not using SASL, so don't do anything. That's all there is for the post-install step, now let's move on to configuring postfix.
Configuring postfix as a Null Client
Our minimal embedded development team server is not going to be a complete mail system. In fact, it's only ever going to send mail to others. We won't enable it to receive email until later, if at all. A server that only sends mail is acalled a null client in postfix terminology.
So the first thing to do is to disable the ability of postfix to pick up mail. You do that by editing your configuration files as suggested in this section on setting up a null client. Wait. Slow down. Let's figure out what this really means. Especially the part about disabling local mail delivery. Exactly what do we touch in the master.cf file to make this happen?
Here's a copy of the relevant parts of my master.cf file that ends up disabling the mail receive and distribute capability of postfix:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
#smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
#local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
See how the smtp and local services are commented out by prefixing them with a "#" - that's all there is to it. Save the file, and now we can figure out the setup for the rest of the system.
I'm running my server on my local network. I've got a Linksys wireless router that handles all the traffic inside the house, and it's connected to my DSL modem. My DSL modem gets an IP address assigned by my local ISP.
To make things even more complicated, I do happen to have a real domain name, but it's hosted by a company across the country. Finally, my ISP (like many others) will not accept email unless it can verify that the domain name that the mail appears to be coming from is in fact real.
On a default setup of postfix, you need to touch exactly three things to send mail out the door. Here's the relevant section from my main.cf file:
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = funkenfanger
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld
mydomain = hempeldesigngroup.com
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
myorigin = $mydomain
All I've done here is added lines to specify myhostname, mydomain and myorigin to reasonable values. The most important one is myorigin, because it needs to be a real domain name or else your mail host is likely to bounce it right back, or worse silently ignore it.
So, to recap, just set myhostname, mydomain and myorigin, makeing sure that myorigin is a real domain. If you are unsure of what to put there for now, use example.com which is reserved for documentation but does actually resolve to an address.
Starting and Testing postfix
Hold on, we're almost done. If you haven't rebooted since we started this article (and why would you) you'll need to start postfix manually. This is accomplished as follows:
postfix start
Any time you make changes to a currently running postfix installation, you'll need to let postfix know so it can parse the changes. Here's how:
postfix reload
Testing your system is as easy as sending yourself some email. I'm assuming that if you are reading this, you have acess to email. We haven't got a fancy GUI installed on our box, and we're using PuTTY to access it, so how are we going to send email?
Well, back in the deep dark past of the early Internet, the hackers of the stone-age were able to send email using a command line interface! Yes, it's true!
Here's a transcript of my test email session....
funkenfanger# mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/sysadmin": 0 messages
& m rhempel@bmts.com
Subject: Test Message
Postfix is up and running on funkenfanger!
.
EOT
& q
funkenfanger#
Pretty primitive, huh? The "&" is mail's idea of a prompt. The "m" followed by an email address is how youstart an email, then you are prompted for a subject line. After that comes the body of your email. The end of the email is signified by a single "." on a line all by itself, which then returns you to the "&" prompt and the "q" gets us back to the standard command prompt.
Of course, you'll use your own email address when testing your postfix installation! Although I'll be happy to get email form you describing how easy it was to get this far, I really don't want to see all of your test emails.
Once you're back at the command prompt, you can check to see if the mail went out as follows:
funkenfanger# mailq
Mail queue is empty
funkenfanger#
In a few minutes, fire up your email client and check your mail. You should get an email from "Charlie Root" with the subject and body you just typed in. If not, yo umight want to check the last few lines of /var/log/maillog to see if there are any error messages that can help you figure out what went wrong.
Well, that's it! We're done with the postfix setup. You'll be getting at least two emails a day from your server. One is the daily run output, and the other is the security run output. They'll give you a basic idea of how your box is doing, how many times other folks tried to hack it, and other useful stuff like disk usage statistics.
Now we can move on to getting Apache 2 up and running. See you at the next article.
* Introduction
* Resources
* Installing postfix from cvs
* Post-Installation Requirements for postfix
* Configuring postfix as a Null Client
* Starting and Testing postfix
Introduction
The previous articles in this series have got you as far as installing perl-5.8 from source, and now we're ready to do some serious work. So why do we need to install an email system on the server first?
Your server is going to run headless which means you don't use it for everyday stuff. You don't need a keyboard, mouse, or display to control it, because that's happening though the ssh interface via PuTTY. In fact, your server is going to sit in a closet and you won't even know it's there.
Which brings us back to email. Your server is going to email you stuff like security reports and daily system checks. Once you get the bug tracker installed, it's going to email team members bug reports and other useful information.
So why not stick with the default sendmail system that ships with FreeBSD? After all, it reportedly handles about 50% of the Internet's email. The reason is that a casual system administrator (you) has little or no chance of really understanding the arcane syntax of the sendamil config file(s). So we're not even going to try. We're going to use postfix instead.
In this article, we'll get postfix installed from source, and learn a bit about figuring out build dependencies. I'll show you how to set up the mailer as a null client, which means it does not receive or route any local mail. It just sends mail to your local mail host or directly to the Internet.
Resources
The postfix program has a wide following, so natuarally it has its own web site with an excellent summary of existing .
The O'Reilly OnLamp website also has a decent article on basic installation and configuration.
For those that really want to dig deep on the internals of postfix, there is the obligatory O'Relly postfix book.
Installing postfix from cvs
Installing postfix from source is relatively straightforward. The first thing to do is figure out if the port requires any other libraries or applications. This is relatively easy if you use the FreeBSD Posts Search page to look for ports with "postfix" in the package name. Here's clickable query link...
http://www.freebsd.org/cgi/ports.cgi?query=postfix&stype=name
We're lucky here, there aren't too many packages with "postfix" in the name. A quick look at the list tells us that the available ports are:
* postfix-2.2.20040504 - which is really called postfix-current
* postfix-2.1.4 - which is really called postfix
Depending on how risk averse you are, I'd pick postfix over postfix-current, unless you absolutely need the latest bleeding edge updates - and for our system, I'm not sure we do.
Either way, have a look at the "Requires" line for the port, and you'll see that pcre-4.5 is needed to build and run postfix. Click on the link for pcre-4.5 and you'll see that it's in the devel category. And it looks like pcre-4.5 has a requirement for libtool-1.5.6_1 which is also in the devel category.
In short, postfix has the following dependencies:
mail/postfix
+- devel/pcre
+- devel/libtool15
Remember that you figure out the download name of the port by clicking on the "Description" link and checking the title of the page you end up on. After a while, you'll figure out that you can just hover the mouse over the "Description" link and get the name from the status bar of your browser.
Now we have enough information to go and get the relevant port files to build postfix. Here are the commands I used to get postfix, as root of course.
setenv CVSROOT :pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs
cd /usr
cvs login
cvs checkout -A -P -r RELEASE_4_10_0 ports/devel/libtool15
cvs checkout -A -P -r RELEASE_4_10_0 ports/devel/pcre
cvs checkout -A -P -r RELEASE_4_10_0 ports/mail/postfix
cvs logout
Building postfix is now simply a matter of:
cd /usr/ports/mail/postfix
make install
The postfix install script is interactive. Don't change anything and just tab over to the "OK" and hit return to accept all the defaults. As the build porgresses, you may (depending on how long ago this was written) see the following scary looking bit of output:
===> postfix-2.0.19,1 depends on shared library: pcre.0 - not found
===> Verifying install for pcre.0 in /usr/ports/devel/pcre
===> pcre-4.5 is marked as broken: unknown LIBTOOL version: 14.
Don't panic. It's just telling us we actually need libtool14 instead of libtool15. So all we need to do is download that port, like this:
setenv CVSROOT :pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs
cd /usr
cvs login
cvs checkout -A -P -r RELEASE_4_10_0 ports/devel/libtool14
cvs logout
and restart the build...
cd /usr/ports/postfix
make install
A little while later, you'll get the following prompts if everything goes well:
Would you like to activate Postfix in /etc/mail/mailer.conf [n]?
Answer "y" and hit Enter. Then you'll see this prompt:
You need user "postfix" added to group "mail".
Would you like me to add it [y]?
Again, answer "y" and hit Enter. That's all the interactive stuff until the installation is complete.
Post-Installation Requirements for postfix
Assuming postfix installed well, and that everything worked, now we need to do some post-install configuration before going much further.
Here's a copy of some important information that scolls by near the the end of the install procedure. I've broken down into useful chunks for discussion...
If you have postfix configured in your /etc/mail/mailer.conf (answered yes to
the previous question) and would like to enable postfix to start at boot time,
please set these variables in your /etc/rc.conf file:
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
This will disable Sendmail completely.
Alternatively to the above settings, you can enable postfix to start with
the other local services, for example, after your database server starts if
you need it to be running for postfix. To do this, set in your rc.conf file:
sendmail_enable="NONE"
Then make the following symbolic link:
cd /usr/local/etc/rc.d
ln -s /usr/local/sbin/postfix postfix.sh
For my installation, I copied the first set of variables and pasted them into my /etc/rc.conf file.
Also, you will want to disable some Sendmail-specific daily maintenance
routines in your /etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
This turned out ot be unnecessary as there is no /etc/periodic.conf file yet on our minimal server, and besides, we disabled sendmail as part of the initial installation of FreeBSD.
If you are using SASL, you need to make sure that postfix has access to read
the sasldb file. This is accomplished by adding postfix to group mail and
making the /usr/local/etc/sasldb* file(s) readable by group mail (this should
be the default for new installs).
We're not using SASL, so don't do anything. That's all there is for the post-install step, now let's move on to configuring postfix.
Configuring postfix as a Null Client
Our minimal embedded development team server is not going to be a complete mail system. In fact, it's only ever going to send mail to others. We won't enable it to receive email until later, if at all. A server that only sends mail is acalled a null client in postfix terminology.
So the first thing to do is to disable the ability of postfix to pick up mail. You do that by editing your configuration files as suggested in this section on setting up a null client. Wait. Slow down. Let's figure out what this really means. Especially the part about disabling local mail delivery. Exactly what do we touch in the master.cf file to make this happen?
Here's a copy of the relevant parts of my master.cf file that ends up disabling the mail receive and distribute capability of postfix:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
#smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
#local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
See how the smtp and local services are commented out by prefixing them with a "#" - that's all there is to it. Save the file, and now we can figure out the setup for the rest of the system.
I'm running my server on my local network. I've got a Linksys wireless router that handles all the traffic inside the house, and it's connected to my DSL modem. My DSL modem gets an IP address assigned by my local ISP.
To make things even more complicated, I do happen to have a real domain name, but it's hosted by a company across the country. Finally, my ISP (like many others) will not accept email unless it can verify that the domain name that the mail appears to be coming from is in fact real.
On a default setup of postfix, you need to touch exactly three things to send mail out the door. Here's the relevant section from my main.cf file:
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = funkenfanger
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld
mydomain = hempeldesigngroup.com
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
myorigin = $mydomain
All I've done here is added lines to specify myhostname, mydomain and myorigin to reasonable values. The most important one is myorigin, because it needs to be a real domain name or else your mail host is likely to bounce it right back, or worse silently ignore it.
So, to recap, just set myhostname, mydomain and myorigin, makeing sure that myorigin is a real domain. If you are unsure of what to put there for now, use example.com which is reserved for documentation but does actually resolve to an address.
Starting and Testing postfix
Hold on, we're almost done. If you haven't rebooted since we started this article (and why would you) you'll need to start postfix manually. This is accomplished as follows:
postfix start
Any time you make changes to a currently running postfix installation, you'll need to let postfix know so it can parse the changes. Here's how:
postfix reload
Testing your system is as easy as sending yourself some email. I'm assuming that if you are reading this, you have acess to email. We haven't got a fancy GUI installed on our box, and we're using PuTTY to access it, so how are we going to send email?
Well, back in the deep dark past of the early Internet, the hackers of the stone-age were able to send email using a command line interface! Yes, it's true!
Here's a transcript of my test email session....
funkenfanger# mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/sysadmin": 0 messages
& m rhempel@bmts.com
Subject: Test Message
Postfix is up and running on funkenfanger!
.
EOT
& q
funkenfanger#
Pretty primitive, huh? The "&" is mail's idea of a prompt. The "m" followed by an email address is how youstart an email, then you are prompted for a subject line. After that comes the body of your email. The end of the email is signified by a single "." on a line all by itself, which then returns you to the "&" prompt and the "q" gets us back to the standard command prompt.
Of course, you'll use your own email address when testing your postfix installation! Although I'll be happy to get email form you describing how easy it was to get this far, I really don't want to see all of your test emails.
Once you're back at the command prompt, you can check to see if the mail went out as follows:
funkenfanger# mailq
Mail queue is empty
funkenfanger#
In a few minutes, fire up your email client and check your mail. You should get an email from "Charlie Root" with the subject and body you just typed in. If not, yo umight want to check the last few lines of /var/log/maillog to see if there are any error messages that can help you figure out what went wrong.
Well, that's it! We're done with the postfix setup. You'll be getting at least two emails a day from your server. One is the daily run output, and the other is the security run output. They'll give you a basic idea of how your box is doing, how many times other folks tried to hack it, and other useful stuff like disk usage statistics.
Now we can move on to getting Apache 2 up and running. See you at the next article.
FreeBSD postfix
Apache22
cd /usr/ports/www/apache22
make install
echo 'apache22_enable="YES"' >> /etc/rc.conf
PHP4
cd /usr/ports/lang/php4
make install
* CLI
* CGI
* Apache module
* Suhosin (?)
* IPV6 (?)
* FastCGI
* Pathinfo
* OpenSSL
* Zlib
Add the typehandler to apache config.
ee /usr/local/etc/apache22/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
Mysql 5.0
cd /usr/ports/databases/mysql50-server
make install
echo 'mysql_enable="YES"' >> /etc/rc.conf
mysqladmin -u root password
phpMyAdmin
cd /usr/ports/databases/phpmyadmin
make install
* All except MysqlI (only php5)
Configuration of phpmyadmin:
cd /usr/local/www/phpMyAdmin
cp libraries/config.default.php config.inc.php
ee config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = '';
Add phpmyadmin to the apache config.
ee /usr/local/etc/apache22/httpd.conf
Insert:
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
Options none
AllowOverride Limit
Order Allow,Deny
Allow from all
Subversion
whereis subversion
cd
make install WITHOUT_BDB=yes
Proftpd
cd /usr/ports/ftp/proftpd
make install
echo 'proftpd_enable="YES"' >> /etc/rc.conf
Additions to the config file.
ee /usr/local/etc/proftpd.conf
AllowRetrieveRestart on
AllowStoreRestart on
Mail server
Postfix
First I install the postfix
cd /usr/ports/mail/postfix
make install
* SASL 2
* TLS
* MySQL
If you not need sendmail anymore, please add in your rc.conf:
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
And you can disable some sendmail specific daily maintenance routines in your
/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
Add the user to the virtual dirs
pw groupadd vmail -g 5001
pw useradd vmail -u 5001 -g 5001 -s/sbin/nologin -d/dev/null
mkdir /usr/local/vmail
chown -R vmail:vmail /usr/local/vmail
chmod -R ug+rwx,o-rwx /usr/local/vmail
The database table layout files
ee /usr/local/etc/postfix/mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT goto FROM alias WHERE address='%s' AND active = 1
ee /usr/local/etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s'
#optional query to use when relaying for backup MX
#query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '0' and active = '1'
ee /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1
ee /usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT quota FROM mailbox WHERE username='%s'
ee /usr/local/etc/postfix/mysql_relay_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1'
chown root:postfix /usr/local/etc/postfix/mysql_*.cf
chmod 640 /usr/local/etc/postfix/mysql_*.cf
Edit the postfix main.cf config file
ee /usr/local/etc/postfix/main.cf
myhostname = teststar.nickit.dk
mydomain = nickit.dk
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mynetworks = $config_directory/mynetworks
relay_domains = mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
header_checks = regexp:/usr/local/etc/postfix/header_checks
# Next, add all these to the bottom of the file :
#
# Virtual Mail Mysql settings
#
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:5001
virtual_gid_maps = static:5001
virtual_mailbox_base = /usr/local/vmail
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5001
# Who handles the mail delivery?
# POSTFIX = virtual
# MAILDROP = maildrop
#
#virtual_transport = virtual
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
# Transport map
transport_maps = hash:/usr/local/etc/postfix/transport
vacation_destination_recipient_limit = 1
# Additional for quota support
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
###################################################################################
### ENABLE SASL SUPPORT ( SMTP-AUTH )
# smtpd_sasl_auth_enable = yes
# Enable SASL support in postfix
# smtpd_sasl_security_options = noanonymous
# Anonymous logins will not be permitted
# broken_sasl_auth_clients = yes
# Allow RFC-broken mail clients like Outlook Express4 to use SMTP AUTH
# smtpd_sasl_path = smptd
# Tells SASL to get the config from /usr/lib64/sasl2/smptd.conf
# smtpd_sasl_local_domain =
# If the user fails to nominate a domain, don't auto append one
# smtpd_sasl_authenticated_header = yes
# Include the authenticated username in the message headers.
# Having this on will make it easier if a spammer cracks one of your user's weak passwords,
# and starts using SMTP-AUTH to relay spam through your server
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_path = smtpd
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unauth_destination,reject_unauth_pipelining,reject_invalid_hostname,reject_rbl_client opm.blitzed.org,reject_rbl_client list.dsbl.org,reject_rbl_client bl.spamcop.net,reject_rbl_client sbl-xbl.spamhaus.org
##################################################################################
### ENABLE TLS SUPPORT ( "STARTTLS" ... enables SSL to be negotiated during a SMTP connection )
# smtp_use_tls = no
# dont enable TLS for outbound SMTP connections
# smtpd_use_tls = yes
# announce TLS availability for incoming SMTP connections
# smtpd_tls_auth_only = no :
# TLS is optional, not enforced
# smtpd_tls_key_file :
# specify the private key ( must not be encrypted - ie no password)
# smtpd_tls_cert_file :
# specify the certificate
# smtpd_tls_session_cache_database :
# nominate a server-side TLS session cache. Improves performance.
# smtpd_tls_loglevel = 1 :
# log basic TLS handshake and cert info
# smtpd_tls_received_header = yes
# record some protocol/cipher etc info in the Received header smtp_use_tls = no
smtp_use_tls = no
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_key_file = /usr/local/ssl/mail.yourdomain.com.key
smtpd_tls_cert_file = /usr/local/ssl/mail.yourdomain.com.crt
smtpd_tls_session_cache_database = btree:/usr/local/etc/postfix/tls_smtpd_scache
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
Populate the mynetworks file
echo '# Localhost' > /usr/local/etc/postfix/mynetworks
echo '127.0.0.0/8' >>/usr/local/etc/postfix/mynetworks
echo '' >>/usr/local/etc/postfix/mynetworks
Addition to the sasl config
ee /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/var/run/authdaemond/socket
chown root:vmail /usr/local/lib/sasl2/smtpd.conf
chmod 640 /usr/local/lib/sasl2/smtpd.conf
ee /usr/local/etc/postfix/master.cf
smtp inet n - n - - smtpd
567 inet n - n - - smtpd
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
Aliases
ee /etc/aliases
root: someone@yourdomain.com
newaliases
PostfixAdmin
cd /usr/ports/mail/postfixadmin
make install
* MySQL
Configuration of the apache
ee /usr/local/etc/apache22/httpd.conf
Alias /mailadmin/ "/usr/local/www/postfixadmin/"
#AllowOverride AuthConfig
Options Indexes
AllowOverride ALL
Order allow,deny
Allow from all
Configuration of the database tables
cd /usr/local/www/postfixadmin
mysql -u root [-p] < DATABASE_MYSQL.TXT
cd /usr/local/www/postfixadmin
chmod 640 *.php *.css
cd /usr/local/www/postfixadmin/admin/
chmod 640 *.php .ht*
cd /usr/local/www/postfixadmin/images/
chmod 640 *.gif *.png
cd /usr/local/www/postfixadmin/languages/
chmod 640 *.lang
cd /usr/local/www/postfixadmin/templates/
chmod 640 *.tpl
cd /usr/local/www/postfixadmin/users/
chmod 640 *.php
ee /usr/local/www/postfixadmin/config.inc.php
// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF['domain_path'] = 'YES';
// If you don't want to have the domain in your mailbox set this to 'NO'.
// Example: /usr/local/virtual/domain.tld/username
$CONF['domain_in_mailbox'] = 'NO';
Courier - Imap
cd /usr/ports/mail/courier-imap
make install
* Mysql
echo 'courier_authdaemond_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_imapd_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_pop3d_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_pop3d_ssl_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_imapd_ssl_enable="YES"' >> /etc/rc.conf
chmod 755 /var/run/authdaemond/
Configuration
ee /usr/local/etc/authlib/authdaemonrc
authmodulelist="authmysql
ee /usr/local/etc/authlib/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_CLEAR_PWFIELD password
#you can optionally enable this next setting if you want
#a particular domain to be appended when users haven't
#specified a domain during authentication
#DEFAULT_DOMAIN yourdomain.com
MYSQL_UID_FIELD '5001'
MYSQL_GID_FIELD '5001'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/usr/local/vmail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD CONCAT("/usr/local/vmail/",maildir)
MYSQL_QUOTA_FIELD concat(quota,'S')
Maildrop
cd /usr/ports/mail/maildrop
make install WITH_AUTHLIB=yes
* Mysql
Vacation
This is a tool to set vacation messages.
cd /usr/ports/databases/p5-DBI
make install
cd /usr/ports/databases/p5-DBD-mysql
make
make install
pw groupadd vacation -g 5002
pw useradd vacation -u 5002 -g 5002 -s/sbin/nologin -d/dev/null
mkdir /var/spool/postfix/vacation
cp /usr/local/www/postfixadmin/VIRTUAL_VACATION/vacation.pl /var/spool/postfix/vacation/
chown -R vacation:vacation /var/spool/postfix/vacation/
chmod 700 /var/spool/postfix/vacation/*
#
# VIRTUAL VACATION
#
vacation unix - n n - - pipe
flags=DRhu user=vacation:vacation argv=/var/spool/postfix/vacation/vacation.pl -f ${sender} -- ${recipient}
ee /usr/local/etc/postfix/transport
autoreply.yourdomain.com vacation
postmap /usr/local/etc/postfix/transport
ee /usr/local/www/postfixadmin/config.inc.php
$CONF['vacation'] = 'YES';
$CONF['vacation_domain'] = 'autoreply.yourdomain.com';
MailDrop - PostfixAdmin maildir creations files
ee /usr/local/sbin/maildirmake.sh
#!/usr/local/bin/bash
set -e
mail_home="/usr/local/vmail"
if [ ! -d $mail_home/$1 ] ; then
mkdir $mail_home/$1
chown -R vmail:vmail $mail_home/$1
chmod -R 700 $mail_home/$1
#echo "$mail_home/$1 CREATED"
fi
if [ -d $mail_home/$1 ] ; then
cd "$mail_home/$1"
/usr/local/bin/maildirmake $2
#echo "$mail_home/$1/$2 CREATED"
/usr/local/bin/maildirmake -q "$3S" $2
#echo "$3S $2 QUOTA CREATED"
chown -R vmail:vmail $mail_home/$1/$2
chmod -R 700 $mail_home/$1/$2
fi
ee /usr/local/sbin/maildirdel.sh
#!/usr/local/bin/bash
set -e
mail_home="/usr/local/vmail"
if [ -d $mail_home/$1/$2 ] ; then
rm -Rf mkdir $mail_home/$1/$2
#echo "$mail_home/$1/$2 DELETED"
fi
chmod +x maildirdel.sh
chmod +x maildirmake.sh
ee /usr/local/www/postfixadmin/create-mailbox.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirmake.sh ".$fDomain." ".$_POST['fUsername']. " ". $quota);
db_log ($SESSID_USERNAME, $fDomain, "create mailbox", "$fUsername");
ee /usr/local/www/postfixadmin/admin/create-mailbox.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirmake.sh ".$fDomain." ".$_POST['fUsername']. " ". $quota);
db_log ($SESSID_USERNAME, $fDomain, "create mailbox", "$fUsername");
ee /usr/local/www/postfixadmin/admin/delete.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirdel.sh ".$domain." ".$user);
db_log ($CONF['admin_email'], $fDomain, "delete mailbox", $fDelete);
ee /usr/local/www/postfixadmin/delete.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirdel.sh ".$domain." ".$user);
db_log ($CONF['admin_email'], $fDomain, "delete mailbox", $fDelete);
Sudo
cd /usr/ports/security/sudo
make install
ee /usr/local/etc/sudoers
www ALL = NOPASSWD: /usr/local/sbin/maildirmake.sh
www ALL = NOPASSWD: /usr/local/sbin/maildirdel.sh
Mailscanner
cd /usr/ports/mail/mailscanner
make initial-config
make install
echo 'mailscanner_enable="YES"' >> /etc/rc.conf
mkdir /var/spool/MailScanner/incoming
mkdir /var/spool/MailScanner/quarantine
mkdir /var/spool/MailScanner/spamassassin
chown postfix:postfix /var/spool/MailScanner/spamassassin
chown postfix:postfix /var/spool/MailScanner/incoming
chown postfix:postfix /var/spool/MailScanner/quarantine
cd /usr/local/etc/MailScanner/
cp MailScanner.conf.sample MailScanner.conf
ee MailScanner.conf
Run As User = postfix
Run As Group = postfix
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
MTA = postfix
Sign Clean Messages = no
# Enable Spam Bounce = %rules-dir%/bounce.rules
Log Spam = yes
SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
#Maximum Message Size = %rules-dir%/max.message.size.rules
cd /usr/local/etc/MailScanner/mcp
cp mcp.spam.assassin.prefs.conf.sample mcp.spam.assassin.prefs.conf
cd /usr/local/www
svn checkout https://svn.roundcube.net/trunk
mv trunk/roundcubemail .
rm -rf trunk
cd roundcubemail
chown -R www:www temp logs
# mysql
> create database 'roundcubemail';
> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
IDENTIFIED BY '$PASSWORD';
> quit
cd config
cp db.inc.php.dist db.inc.php
cp main.inc.php.dist main.inc.php
Alias /mail "/usr/local/www/roundcubemail"
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from All
1) As root, change to the webroot of Apache
cd /usr/local/www/data-dist
2) Login to the Sourceforge Roundcubemail CVS server (when prompted for a password, just press ENTER)
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/roundcubemail login
2) Checkout Roundcubemail from the Sourceforge SVN server (when prompted, choose ‘p’ to accept the encrypted key permanantly)
svn checkout https://svn.roundcube.net/trunk
3) Change into the roundcubemail directory
cd roundcubemail
3) Move the roundcubemail directory to your webroot, remove the ‘trunk’ directory, and then change into the roundcubemail directory
mv trunk/roundcubemail .
rm -rf trunk
cd roundcubemail
4) Set permissions of the temp and logs dir so that the web user can read/write to them
chown -R www:www temp logs
5) Create a database for storage of Roundcubemail data, replace $PASSWORD with the password you want the roundcube user to use to access mySQL
# mysql
> create database 'roundcubemail';
> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
IDENTIFIED BY '$PASSWORD';
> quit
6) Import the inital Roundcubemail SQL
# mysql roundcubemail < SQL/mysql.initial.sql
7) Change into the config directory
cd config
8) Copy the config *php.dist files to *.php
cp db.inc.php.dist db.inc.php
cp main.inc.php.dist main.inc.php
9) Modify the config files to suit your environment. In db.inc.php you only need to change the database definition line, add your password in place of $PASSWORD
$rcmail_config['db_dsnw'] = 'mysql://roundcube:PASSWORD@localhost/roundcubemail';
Assuming your mailserver is running on the same physical box as the webserver, disable database caching
$rcmail_config['enable_caching'] = FALSE;
define the host as localhost
$rcmail_config['default_host'] = 'localhost';
define smtp as localhost
$rcmail_config['smtp_server'] = 'localhost';
and increase the session lifetime from 5 to something more reasonable (optional)
$rcmail_config['session_lifetime'] = 30;
Launch a web browser and point it to
http://some.url/roundcubemail
Then login with a valid/existing IMAP username and password.
To debug problems just tail -f (or multitail if you’re cool like me) /var/log/maillog to see what’s happening behind the scenes. Consult the mailing lists for issues and feel free to give feedback below. Since this app is under heavy development I expect this HOWTO to change as the app does.
Debugging
Courier authtest
/usr/local/sbin/authtest someuser@yourdomain.com somepassword
ee /usr/local/etc/authlib/authdaemonrc
DEBUG_LOGIN=1 # turn on authentication debugging
DEBUG_LOGIN=2 # turn on authentication debugging AND show passwords
Debug Maildrop
maildrop -V9 -d someone@yourdomain.com
maildrop: authlib: groupid=1001
maildrop: authlib: userid=1001
maildrop: authlib: logname=someone@yourdomain.com, home=/var/vmail, mail=yourdomain.com/s/someone/Maildir/
maildrop: Changing to /opt/mail
make install
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database:
# mysqladmin --user=root create cacti
2. Create a mysql user/password for cacti:
(change user and/or password if requered)
# echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;" | mysql
3. Import the default cacti database:
# mysql cacti < /usr/local/share/cacti/cacti.sql
4. Edit /usr/local/share/cacti/include/db-settings.php.
5. Add a line to your /etc/crontab file similar to:
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
6. Add alias in apache config for the cacti dir:
Alias /cacti "/usr/local/share/cacti/"
7. Be sure apache gives an access to the directory ('Allow from' keywords).
8. Open a cacti login page in your web browser and login with admin/admin.
If you update cacti, open a login page, an updating process
will start automatically.
If you are using PLUGIN option set, in file
/usr/local/share/cacti/include/config.php
change the follow line
$config["url_path"] = '/';
with location where your cacti is available. E.g.:
$config["url_path"] = '/cacti/';
if your URL is http://yoursite.com/cacti
cd /usr/ports/www/apache22
make install
echo 'apache22_enable="YES"' >> /etc/rc.conf
PHP4
cd /usr/ports/lang/php4
make install
* CLI
* CGI
* Apache module
* Suhosin (?)
* IPV6 (?)
* FastCGI
* Pathinfo
* OpenSSL
* Zlib
Add the typehandler to apache config.
ee /usr/local/etc/apache22/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
Mysql 5.0
cd /usr/ports/databases/mysql50-server
make install
echo 'mysql_enable="YES"' >> /etc/rc.conf
mysqladmin -u root password
phpMyAdmin
cd /usr/ports/databases/phpmyadmin
make install
* All except MysqlI (only php5)
Configuration of phpmyadmin:
cd /usr/local/www/phpMyAdmin
cp libraries/config.default.php config.inc.php
ee config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = '';
Add phpmyadmin to the apache config.
ee /usr/local/etc/apache22/httpd.conf
Insert:
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
Options none
AllowOverride Limit
Order Allow,Deny
Allow from all
Subversion
whereis subversion
cd
make install WITHOUT_BDB=yes
Proftpd
cd /usr/ports/ftp/proftpd
make install
echo 'proftpd_enable="YES"' >> /etc/rc.conf
Additions to the config file.
ee /usr/local/etc/proftpd.conf
AllowRetrieveRestart on
AllowStoreRestart on
Mail server
Postfix
First I install the postfix
cd /usr/ports/mail/postfix
make install
* SASL 2
* TLS
* MySQL
If you not need sendmail anymore, please add in your rc.conf:
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
And you can disable some sendmail specific daily maintenance routines in your
/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
Add the user to the virtual dirs
pw groupadd vmail -g 5001
pw useradd vmail -u 5001 -g 5001 -s/sbin/nologin -d/dev/null
mkdir /usr/local/vmail
chown -R vmail:vmail /usr/local/vmail
chmod -R ug+rwx,o-rwx /usr/local/vmail
The database table layout files
ee /usr/local/etc/postfix/mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT goto FROM alias WHERE address='%s' AND active = 1
ee /usr/local/etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s'
#optional query to use when relaying for backup MX
#query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '0' and active = '1'
ee /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1
ee /usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT quota FROM mailbox WHERE username='%s'
ee /usr/local/etc/postfix/mysql_relay_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1'
chown root:postfix /usr/local/etc/postfix/mysql_*.cf
chmod 640 /usr/local/etc/postfix/mysql_*.cf
Edit the postfix main.cf config file
ee /usr/local/etc/postfix/main.cf
myhostname = teststar.nickit.dk
mydomain = nickit.dk
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mynetworks = $config_directory/mynetworks
relay_domains = mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
header_checks = regexp:/usr/local/etc/postfix/header_checks
# Next, add all these to the bottom of the file :
#
# Virtual Mail Mysql settings
#
virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:5001
virtual_gid_maps = static:5001
virtual_mailbox_base = /usr/local/vmail
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5001
# Who handles the mail delivery?
# POSTFIX = virtual
# MAILDROP = maildrop
#
#virtual_transport = virtual
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
# Transport map
transport_maps = hash:/usr/local/etc/postfix/transport
vacation_destination_recipient_limit = 1
# Additional for quota support
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
###################################################################################
### ENABLE SASL SUPPORT ( SMTP-AUTH )
# smtpd_sasl_auth_enable = yes
# Enable SASL support in postfix
# smtpd_sasl_security_options = noanonymous
# Anonymous logins will not be permitted
# broken_sasl_auth_clients = yes
# Allow RFC-broken mail clients like Outlook Express4 to use SMTP AUTH
# smtpd_sasl_path = smptd
# Tells SASL to get the config from /usr/lib64/sasl2/smptd.conf
# smtpd_sasl_local_domain =
# If the user fails to nominate a domain, don't auto append one
# smtpd_sasl_authenticated_header = yes
# Include the authenticated username in the message headers.
# Having this on will make it easier if a spammer cracks one of your user's weak passwords,
# and starts using SMTP-AUTH to relay spam through your server
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_path = smtpd
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unauth_destination,reject_unauth_pipelining,reject_invalid_hostname,reject_rbl_client opm.blitzed.org,reject_rbl_client list.dsbl.org,reject_rbl_client bl.spamcop.net,reject_rbl_client sbl-xbl.spamhaus.org
##################################################################################
### ENABLE TLS SUPPORT ( "STARTTLS" ... enables SSL to be negotiated during a SMTP connection )
# smtp_use_tls = no
# dont enable TLS for outbound SMTP connections
# smtpd_use_tls = yes
# announce TLS availability for incoming SMTP connections
# smtpd_tls_auth_only = no :
# TLS is optional, not enforced
# smtpd_tls_key_file :
# specify the private key ( must not be encrypted - ie no password)
# smtpd_tls_cert_file :
# specify the certificate
# smtpd_tls_session_cache_database :
# nominate a server-side TLS session cache. Improves performance.
# smtpd_tls_loglevel = 1 :
# log basic TLS handshake and cert info
# smtpd_tls_received_header = yes
# record some protocol/cipher etc info in the Received header smtp_use_tls = no
smtp_use_tls = no
smtpd_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_key_file = /usr/local/ssl/mail.yourdomain.com.key
smtpd_tls_cert_file = /usr/local/ssl/mail.yourdomain.com.crt
smtpd_tls_session_cache_database = btree:/usr/local/etc/postfix/tls_smtpd_scache
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
Populate the mynetworks file
echo '# Localhost' > /usr/local/etc/postfix/mynetworks
echo '127.0.0.0/8' >>/usr/local/etc/postfix/mynetworks
echo '' >>/usr/local/etc/postfix/mynetworks
Addition to the sasl config
ee /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/var/run/authdaemond/socket
chown root:vmail /usr/local/lib/sasl2/smtpd.conf
chmod 640 /usr/local/lib/sasl2/smtpd.conf
ee /usr/local/etc/postfix/master.cf
smtp inet n - n - - smtpd
567 inet n - n - - smtpd
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
Aliases
ee /etc/aliases
root: someone@yourdomain.com
newaliases
PostfixAdmin
cd /usr/ports/mail/postfixadmin
make install
* MySQL
Configuration of the apache
ee /usr/local/etc/apache22/httpd.conf
Alias /mailadmin/ "/usr/local/www/postfixadmin/"
#AllowOverride AuthConfig
Options Indexes
AllowOverride ALL
Order allow,deny
Allow from all
Configuration of the database tables
cd /usr/local/www/postfixadmin
mysql -u root [-p] < DATABASE_MYSQL.TXT
cd /usr/local/www/postfixadmin
chmod 640 *.php *.css
cd /usr/local/www/postfixadmin/admin/
chmod 640 *.php .ht*
cd /usr/local/www/postfixadmin/images/
chmod 640 *.gif *.png
cd /usr/local/www/postfixadmin/languages/
chmod 640 *.lang
cd /usr/local/www/postfixadmin/templates/
chmod 640 *.tpl
cd /usr/local/www/postfixadmin/users/
chmod 640 *.php
ee /usr/local/www/postfixadmin/config.inc.php
// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF['domain_path'] = 'YES';
// If you don't want to have the domain in your mailbox set this to 'NO'.
// Example: /usr/local/virtual/domain.tld/username
$CONF['domain_in_mailbox'] = 'NO';
Courier - Imap
cd /usr/ports/mail/courier-imap
make install
* Mysql
echo 'courier_authdaemond_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_imapd_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_pop3d_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_pop3d_ssl_enable="YES"' >> /etc/rc.conf
echo 'courier_imap_imapd_ssl_enable="YES"' >> /etc/rc.conf
chmod 755 /var/run/authdaemond/
Configuration
ee /usr/local/etc/authlib/authdaemonrc
authmodulelist="authmysql
ee /usr/local/etc/authlib/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_CLEAR_PWFIELD password
#you can optionally enable this next setting if you want
#a particular domain to be appended when users haven't
#specified a domain during authentication
#DEFAULT_DOMAIN yourdomain.com
MYSQL_UID_FIELD '5001'
MYSQL_GID_FIELD '5001'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/usr/local/vmail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD CONCAT("/usr/local/vmail/",maildir)
MYSQL_QUOTA_FIELD concat(quota,'S')
Maildrop
cd /usr/ports/mail/maildrop
make install WITH_AUTHLIB=yes
* Mysql
Vacation
This is a tool to set vacation messages.
cd /usr/ports/databases/p5-DBI
make install
cd /usr/ports/databases/p5-DBD-mysql
make
make install
pw groupadd vacation -g 5002
pw useradd vacation -u 5002 -g 5002 -s/sbin/nologin -d/dev/null
mkdir /var/spool/postfix/vacation
cp /usr/local/www/postfixadmin/VIRTUAL_VACATION/vacation.pl /var/spool/postfix/vacation/
chown -R vacation:vacation /var/spool/postfix/vacation/
chmod 700 /var/spool/postfix/vacation/*
#
# VIRTUAL VACATION
#
vacation unix - n n - - pipe
flags=DRhu user=vacation:vacation argv=/var/spool/postfix/vacation/vacation.pl -f ${sender} -- ${recipient}
ee /usr/local/etc/postfix/transport
autoreply.yourdomain.com vacation
postmap /usr/local/etc/postfix/transport
ee /usr/local/www/postfixadmin/config.inc.php
$CONF['vacation'] = 'YES';
$CONF['vacation_domain'] = 'autoreply.yourdomain.com';
MailDrop - PostfixAdmin maildir creations files
ee /usr/local/sbin/maildirmake.sh
#!/usr/local/bin/bash
set -e
mail_home="/usr/local/vmail"
if [ ! -d $mail_home/$1 ] ; then
mkdir $mail_home/$1
chown -R vmail:vmail $mail_home/$1
chmod -R 700 $mail_home/$1
#echo "$mail_home/$1 CREATED"
fi
if [ -d $mail_home/$1 ] ; then
cd "$mail_home/$1"
/usr/local/bin/maildirmake $2
#echo "$mail_home/$1/$2 CREATED"
/usr/local/bin/maildirmake -q "$3S" $2
#echo "$3S $2 QUOTA CREATED"
chown -R vmail:vmail $mail_home/$1/$2
chmod -R 700 $mail_home/$1/$2
fi
ee /usr/local/sbin/maildirdel.sh
#!/usr/local/bin/bash
set -e
mail_home="/usr/local/vmail"
if [ -d $mail_home/$1/$2 ] ; then
rm -Rf mkdir $mail_home/$1/$2
#echo "$mail_home/$1/$2 DELETED"
fi
chmod +x maildirdel.sh
chmod +x maildirmake.sh
ee /usr/local/www/postfixadmin/create-mailbox.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirmake.sh ".$fDomain." ".$_POST['fUsername']. " ". $quota);
db_log ($SESSID_USERNAME, $fDomain, "create mailbox", "$fUsername");
ee /usr/local/www/postfixadmin/admin/create-mailbox.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirmake.sh ".$fDomain." ".$_POST['fUsername']. " ". $quota);
db_log ($SESSID_USERNAME, $fDomain, "create mailbox", "$fUsername");
ee /usr/local/www/postfixadmin/admin/delete.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirdel.sh ".$domain." ".$user);
db_log ($CONF['admin_email'], $fDomain, "delete mailbox", $fDelete);
ee /usr/local/www/postfixadmin/delete.php
system("/usr/local/bin/sudo /usr/local/sbin/maildirdel.sh ".$domain." ".$user);
db_log ($CONF['admin_email'], $fDomain, "delete mailbox", $fDelete);
Sudo
cd /usr/ports/security/sudo
make install
ee /usr/local/etc/sudoers
www ALL = NOPASSWD: /usr/local/sbin/maildirmake.sh
www ALL = NOPASSWD: /usr/local/sbin/maildirdel.sh
Mailscanner
cd /usr/ports/mail/mailscanner
make initial-config
make install
echo 'mailscanner_enable="YES"' >> /etc/rc.conf
mkdir /var/spool/MailScanner/incoming
mkdir /var/spool/MailScanner/quarantine
mkdir /var/spool/MailScanner/spamassassin
chown postfix:postfix /var/spool/MailScanner/spamassassin
chown postfix:postfix /var/spool/MailScanner/incoming
chown postfix:postfix /var/spool/MailScanner/quarantine
cd /usr/local/etc/MailScanner/
cp MailScanner.conf.sample MailScanner.conf
ee MailScanner.conf
Run As User = postfix
Run As Group = postfix
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
MTA = postfix
Sign Clean Messages = no
# Enable Spam Bounce = %rules-dir%/bounce.rules
Log Spam = yes
SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
#Maximum Message Size = %rules-dir%/max.message.size.rules
cd /usr/local/etc/MailScanner/mcp
cp mcp.spam.assassin.prefs.conf.sample mcp.spam.assassin.prefs.conf
cd /usr/local/www
svn checkout https://svn.roundcube.net/trunk
mv trunk/roundcubemail .
rm -rf trunk
cd roundcubemail
chown -R www:www temp logs
# mysql
> create database 'roundcubemail';
> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
IDENTIFIED BY '$PASSWORD';
> quit
cd config
cp db.inc.php.dist db.inc.php
cp main.inc.php.dist main.inc.php
Alias /mail "/usr/local/www/roundcubemail"
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from All
1) As root, change to the webroot of Apache
cd /usr/local/www/data-dist
2) Login to the Sourceforge Roundcubemail CVS server (when prompted for a password, just press ENTER)
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/roundcubemail login
2) Checkout Roundcubemail from the Sourceforge SVN server (when prompted, choose ‘p’ to accept the encrypted key permanantly)
svn checkout https://svn.roundcube.net/trunk
3) Change into the roundcubemail directory
cd roundcubemail
3) Move the roundcubemail directory to your webroot, remove the ‘trunk’ directory, and then change into the roundcubemail directory
mv trunk/roundcubemail .
rm -rf trunk
cd roundcubemail
4) Set permissions of the temp and logs dir so that the web user can read/write to them
chown -R www:www temp logs
5) Create a database for storage of Roundcubemail data, replace $PASSWORD with the password you want the roundcube user to use to access mySQL
# mysql
> create database 'roundcubemail';
> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
IDENTIFIED BY '$PASSWORD';
> quit
6) Import the inital Roundcubemail SQL
# mysql roundcubemail < SQL/mysql.initial.sql
7) Change into the config directory
cd config
8) Copy the config *php.dist files to *.php
cp db.inc.php.dist db.inc.php
cp main.inc.php.dist main.inc.php
9) Modify the config files to suit your environment. In db.inc.php you only need to change the database definition line, add your password in place of $PASSWORD
$rcmail_config['db_dsnw'] = 'mysql://roundcube:PASSWORD@localhost/roundcubemail';
Assuming your mailserver is running on the same physical box as the webserver, disable database caching
$rcmail_config['enable_caching'] = FALSE;
define the host as localhost
$rcmail_config['default_host'] = 'localhost';
define smtp as localhost
$rcmail_config['smtp_server'] = 'localhost';
and increase the session lifetime from 5 to something more reasonable (optional)
$rcmail_config['session_lifetime'] = 30;
Launch a web browser and point it to
http://some.url/roundcubemail
Then login with a valid/existing IMAP username and password.
To debug problems just tail -f (or multitail if you’re cool like me) /var/log/maillog to see what’s happening behind the scenes. Consult the mailing lists for issues and feel free to give feedback below. Since this app is under heavy development I expect this HOWTO to change as the app does.
Debugging
Courier authtest
/usr/local/sbin/authtest someuser@yourdomain.com somepassword
ee /usr/local/etc/authlib/authdaemonrc
DEBUG_LOGIN=1 # turn on authentication debugging
DEBUG_LOGIN=2 # turn on authentication debugging AND show passwords
Debug Maildrop
maildrop -V9 -d someone@yourdomain.com
maildrop: authlib: groupid=1001
maildrop: authlib: userid=1001
maildrop: authlib: logname=someone@yourdomain.com, home=/var/vmail, mail=yourdomain.com/s/someone/Maildir/
maildrop: Changing to /opt/mail
make install
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database:
# mysqladmin --user=root create cacti
2. Create a mysql user/password for cacti:
(change user and/or password if requered)
# echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;" | mysql
3. Import the default cacti database:
# mysql cacti < /usr/local/share/cacti/cacti.sql
4. Edit /usr/local/share/cacti/include/db-settings.php.
5. Add a line to your /etc/crontab file similar to:
*/5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
6. Add alias in apache config for the cacti dir:
Alias /cacti "/usr/local/share/cacti/"
7. Be sure apache gives an access to the directory ('Allow from' keywords).
8. Open a cacti login page in your web browser and login with admin/admin.
If you update cacti, open a login page, an updating process
will start automatically.
If you are using PLUGIN option set, in file
/usr/local/share/cacti/include/config.php
change the follow line
$config["url_path"] = '/';
with location where your cacti is available. E.g.:
$config["url_path"] = '/cacti/';
if your URL is http://yoursite.com/cacti
Saturday, March 21
Konfigurasi Samba Sebagai PDC di Ubuntu Server
Samba adalah himpunan aplikasi yang bertujuan agar komputer dengan sistem operasi Linux, BSD ( atau UNIX lainnya) dapat bertindak sebagai file dan print server yang berbasis protokol SMB (session message block). Jaringan yang semacam ini biasa dijumpai pada Windows workgroup atau Windows NT Domain. Samba juga dilengkapi dengan beberapa program bantu sehingga sistem operasi Linux (dan UNIX lainnya) bisa mengakses resources yang ada pada jaringan Windows yang telah ada. Bisa dikatakan, Samba adalah jembatan penghubung antara Windows dan UNIX.
Samba terdiri atas dua program yang berjalan di background: SMBD dan NMBD. Secara singkat dapat disebutkan bahwa SMBD adalah file server yang akan menghasilkan proses baru untuk setiap client yang aktif sementara NMBD bertugas mengkonversi nama komputer (NetBIOS) menjadi alamat IP sekaligus juga memantau share yang ada di jaringan. Kerja SMBD sendiri diatur melalui file konfigurasi /etc/samba/smb.conf. Dengan membuat file konfigurasi yang tepat, Samba dapat dijadikan file server, print server, domain controller, dan banyak fungsi lainnya.
Berikut ini adalah cara mengkonfigurasi Samba Server Sebagai PDC :
1. pertama dowload program samba dan accesorisnya :
apt-get install samba samba-common samba-doc libcupsys2-gnutls10 libkrb53 winbind smbclient
2. Konfigurasi /etc/samba/smb.conf sebagai berikut :
[global]
workgroup = ubuntudk.com --> ubah sesuain yang kita mau
netbios name = ubuntuserver --> ubah sesuain yang kita mau
server string = %h server (Samba, Ubuntu) --> ubah sesuain yang kita mau
passdb backend = tdbsam
security = user
username map = /etc/samba/smbusers
name resolve order = wins bcast hosts
domain logons = yes
preferred master = yes
wins support = yes
# Useradd scripts
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u
idmap uid = 15000-20000
idmap gid = 15000-20000
# sync smb passwords woth linux passwords
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
passwd chat debug = yes
unix password sync = yes
# set the loglevel
log level = 3
[homes]
comment = Home
valid users = %S
read only = no
browsable = no
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
admin users = Administrator
valid users = %U
read only = no
[profile]
comment = User profiles
path = /home/samba/profiles
valid users = %U
create mode = 0600
directory mode = 0700
writable = yes
browsable = no
3. Buat beberapa direktori berikut sebagai domain logon dan profile :
mkdir /home/samba
mkdir /home/samba/netlogon
mkdir /home/samba/profiles
mkdir /var/spool/samba
chmod 777 /var/spool/samba/
chown -R root:users /home/samba/
chmod -R 771 /home/samba/
4. Lalu restart samba
/etc/init.d/samba restart
5. Ubah pada bagian /etc/nsswitch.conf, pada baris :
hosts: files dns
menjadi :
hosts: files wins dns
6. tambahkan beberapa pc clinet pada /etc/hosts :
127.0.0.1 localhost
192.168.0.136 ubuntuserver.dk.co.id ubuntuserver.dk.co.id
192.168.0.131 ciko
192.168.0.133 dian
192.168.0.135 gustin
7. Tambahkan user root kedalam user samba :
smbpasswd -a root
New SMB password:
Retype new SMB password:
8. buat file /etc/samba/smbusers lalu jalankan :
echo "root = Administrator" > /etc/samba/smbusers
mengartikan bahwa user root = user administrator pada windows
9. Test drive, apakah settingan kita dah benar :
smbclient -L localhost -U%
akan menghasilkan output :
Domain=[UBUNTUDK.COM] OS=[Unix] Server=[Samba 3.0.22]
Sharename Type Comment
--------- ---- -------
netlogon Disk Network Logon Service
allusers Disk All Users
IPC$ IPC IPC Service (ubuntuserver server (Samba, Ubuntu))
ADMIN$ IPC IPC Service (ubuntuserver server (Samba, Ubuntu))
Domain=[UBUNTUDK.COM] OS=[Unix] Server=[Samba 3.0.22]
Server Comment
--------- -------
UBUNTUSERVER ubuntuserver server (Samba, Ubuntu)
Workgroup Master
--------- -------
UBUNTUDK.COM UBUNTUSERVER
10. lalu kita setup domain group untuk windows, jalankan perintah :
net groupmap modify ntgroup="Domain Admins" unixgroup=root
net groupmap modify ntgroup="Domain Users" unixgroup=users
net groupmap modify ntgroup="Domain Guests" unixgroup=nogroup
11. tambah user linux dan user samba dengan cara :
user linux :
useradd ciko -m -G users
user samba :
smbpasswd -a ciko
12. Sekarang tambahan direktori share yang akan dipakai oleh seluruh user :
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/
13. Ubah juga pada /etc/samba/smb.conf, tambahkan baris berikut :
[allusers]
comment = All Users
path = /home/shares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
14. lalu restart samba kembali :
/etc/init.d/samba restart
15. Langkah Yang terakhir dalah dengan menjoinkan mesin windows ke pdc linux kita, dengan cara : ( Testing Dengan Windows XP )
- click kanan pada mycomputer
- pilih computer name lalu change
- masukan domain PDC pada bagisn domain
- akan muncul windows yang meminta memasukan user dan password, pada langkah ini masukan user root dan password samba untuk user root
- OK
- Akan muncul bahwa kita sukses menjoinkan mesin windows ke PDC linux
Nb :
Ubuntu Server 6.06
Windows Xp SP2 ( Client )
Referensi :
http://howtoforge.com/
http://ariya.pandu.org/linux/feature/pdc/pdc.htm
Samba terdiri atas dua program yang berjalan di background: SMBD dan NMBD. Secara singkat dapat disebutkan bahwa SMBD adalah file server yang akan menghasilkan proses baru untuk setiap client yang aktif sementara NMBD bertugas mengkonversi nama komputer (NetBIOS) menjadi alamat IP sekaligus juga memantau share yang ada di jaringan. Kerja SMBD sendiri diatur melalui file konfigurasi /etc/samba/smb.conf. Dengan membuat file konfigurasi yang tepat, Samba dapat dijadikan file server, print server, domain controller, dan banyak fungsi lainnya.
Berikut ini adalah cara mengkonfigurasi Samba Server Sebagai PDC :
1. pertama dowload program samba dan accesorisnya :
apt-get install samba samba-common samba-doc libcupsys2-gnutls10 libkrb53 winbind smbclient
2. Konfigurasi /etc/samba/smb.conf sebagai berikut :
[global]
workgroup = ubuntudk.com --> ubah sesuain yang kita mau
netbios name = ubuntuserver --> ubah sesuain yang kita mau
server string = %h server (Samba, Ubuntu) --> ubah sesuain yang kita mau
passdb backend = tdbsam
security = user
username map = /etc/samba/smbusers
name resolve order = wins bcast hosts
domain logons = yes
preferred master = yes
wins support = yes
# Useradd scripts
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u
idmap uid = 15000-20000
idmap gid = 15000-20000
# sync smb passwords woth linux passwords
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
passwd chat debug = yes
unix password sync = yes
# set the loglevel
log level = 3
[homes]
comment = Home
valid users = %S
read only = no
browsable = no
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
admin users = Administrator
valid users = %U
read only = no
[profile]
comment = User profiles
path = /home/samba/profiles
valid users = %U
create mode = 0600
directory mode = 0700
writable = yes
browsable = no
3. Buat beberapa direktori berikut sebagai domain logon dan profile :
mkdir /home/samba
mkdir /home/samba/netlogon
mkdir /home/samba/profiles
mkdir /var/spool/samba
chmod 777 /var/spool/samba/
chown -R root:users /home/samba/
chmod -R 771 /home/samba/
4. Lalu restart samba
/etc/init.d/samba restart
5. Ubah pada bagian /etc/nsswitch.conf, pada baris :
hosts: files dns
menjadi :
hosts: files wins dns
6. tambahkan beberapa pc clinet pada /etc/hosts :
127.0.0.1 localhost
192.168.0.136 ubuntuserver.dk.co.id ubuntuserver.dk.co.id
192.168.0.131 ciko
192.168.0.133 dian
192.168.0.135 gustin
7. Tambahkan user root kedalam user samba :
smbpasswd -a root
New SMB password:
Retype new SMB password:
8. buat file /etc/samba/smbusers lalu jalankan :
echo "root = Administrator" > /etc/samba/smbusers
mengartikan bahwa user root = user administrator pada windows
9. Test drive, apakah settingan kita dah benar :
smbclient -L localhost -U%
akan menghasilkan output :
Domain=[UBUNTUDK.COM] OS=[Unix] Server=[Samba 3.0.22]
Sharename Type Comment
--------- ---- -------
netlogon Disk Network Logon Service
allusers Disk All Users
IPC$ IPC IPC Service (ubuntuserver server (Samba, Ubuntu))
ADMIN$ IPC IPC Service (ubuntuserver server (Samba, Ubuntu))
Domain=[UBUNTUDK.COM] OS=[Unix] Server=[Samba 3.0.22]
Server Comment
--------- -------
UBUNTUSERVER ubuntuserver server (Samba, Ubuntu)
Workgroup Master
--------- -------
UBUNTUDK.COM UBUNTUSERVER
10. lalu kita setup domain group untuk windows, jalankan perintah :
net groupmap modify ntgroup="Domain Admins" unixgroup=root
net groupmap modify ntgroup="Domain Users" unixgroup=users
net groupmap modify ntgroup="Domain Guests" unixgroup=nogroup
11. tambah user linux dan user samba dengan cara :
user linux :
useradd ciko -m -G users
user samba :
smbpasswd -a ciko
12. Sekarang tambahan direktori share yang akan dipakai oleh seluruh user :
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/
13. Ubah juga pada /etc/samba/smb.conf, tambahkan baris berikut :
[allusers]
comment = All Users
path = /home/shares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
14. lalu restart samba kembali :
/etc/init.d/samba restart
15. Langkah Yang terakhir dalah dengan menjoinkan mesin windows ke pdc linux kita, dengan cara : ( Testing Dengan Windows XP )
- click kanan pada mycomputer
- pilih computer name lalu change
- masukan domain PDC pada bagisn domain
- akan muncul windows yang meminta memasukan user dan password, pada langkah ini masukan user root dan password samba untuk user root
- OK
- Akan muncul bahwa kita sukses menjoinkan mesin windows ke PDC linux
Nb :
Ubuntu Server 6.06
Windows Xp SP2 ( Client )
Referensi :
http://howtoforge.com/
http://ariya.pandu.org/linux/feature/pdc/pdc.htm
Wednesday, March 18
Ms Office 2007 on ubuntu
Wouldn’t it be lovely to have a nice, clean installation of Microsoft’s Office 2007 Suite to run on your Ubuntu Linux Distribution? For some people, this is the only thing that truly holds them back from an all-Linux environment… But not anymore! We have compiled a nice, concise set of instructions to help guide you along.
Install Wine:
WINE (Wine Is Not an Emulator) is an application layer for Linux that interprets the Windows API and DLLs into native Linux commands. This allows for programs made for Windows to be run in Linux!
In order to run Office 2007, Wine 1.1.9 (or newer) is required. It is currently in a development release. If you don’t have it installed already (this is very likely), go ahead and type the following commands, which will set it up for you:
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/winehq.list
sudo apt-get update
sudo apt-get install wine cabextract
NOTE: On non-Debian based systems, this will not work. Please refer to this site for installation instructions.
You should now have an installation of Wine 1.1.9 installed on your system. To confirm the version of Wine installed, type the following:
wine --version
Install winetricks:
Winetricks is a small SH script which will go on the internet and automatically fetch and install Microsoft DLLs and Libraries into Wine with almost no hassle at all! To download it directly, type the following commands:
wget http://www.kegel.com/wine/winetricks
chmod +x ./winetricks
Utilize winetricks:
This will setup all necessary libraries and DLLs that Office 2007 will need to run properly:
./winetricks gdiplus riched20 riched30 msxml3 msxml4 msxml6 corefonts tahoma vb6run vcrun6 msi2
Please be patient while the downloads complete. This script is working hard and is saving hours of your time.
Insert Office 2007 Disk and Run Setup!
Now that we have all of the DLLs necessary to run the Installer, let us do so!
wine pathToCD/setup.exe
From here on out, you should be good to go! The installer should run and install everything just as if it was a Windows system!
If you have any problems, ask, and we’ll try to help you out as much as possible!
Install Wine:
WINE (Wine Is Not an Emulator) is an application layer for Linux that interprets the Windows API and DLLs into native Linux commands. This allows for programs made for Windows to be run in Linux!
In order to run Office 2007, Wine 1.1.9 (or newer) is required. It is currently in a development release. If you don’t have it installed already (this is very likely), go ahead and type the following commands, which will set it up for you:
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/winehq.list
sudo apt-get update
sudo apt-get install wine cabextract
NOTE: On non-Debian based systems, this will not work. Please refer to this site for installation instructions.
You should now have an installation of Wine 1.1.9 installed on your system. To confirm the version of Wine installed, type the following:
wine --version
Install winetricks:
Winetricks is a small SH script which will go on the internet and automatically fetch and install Microsoft DLLs and Libraries into Wine with almost no hassle at all! To download it directly, type the following commands:
wget http://www.kegel.com/wine/winetricks
chmod +x ./winetricks
Utilize winetricks:
This will setup all necessary libraries and DLLs that Office 2007 will need to run properly:
./winetricks gdiplus riched20 riched30 msxml3 msxml4 msxml6 corefonts tahoma vb6run vcrun6 msi2
Please be patient while the downloads complete. This script is working hard and is saving hours of your time.
Insert Office 2007 Disk and Run Setup!
Now that we have all of the DLLs necessary to run the Installer, let us do so!
wine pathToCD/setup.exe
From here on out, you should be good to go! The installer should run and install everything just as if it was a Windows system!
If you have any problems, ask, and we’ll try to help you out as much as possible!
Tuesday, March 17
Ericsson pushes VDSL2 data transfers above 500Mbps
FOR FURTHER INFORMATION, PLEASE CONTACT
Ericsson Corporate Public & Media Relations
Phone: +46 10 719 69 92
E-mail: press.relations@ericsson.com
Ericsson has achieved data transfer rates of more than 500Mbps in what it said is the world's first live demonstration of a new VDSL2-based technology.
The demonstration achieved data rates of more than 0.5 Gbps over twisted copper pairs using "vectorised" VDSL2, the latest technology for line bonding and crosstalk cancellation.
It showed aggregated rates of above 0.5Gbps at 500 metres, bonding six lines.
Vectorised VDSL2 is said to enable extremely high end-to-end transmission rates, improving VDSL2 performance by reducing noise originating from the other copper pairs in the same cable bundle.
This increases capacity and reach, boosting the number of customers that can be connected.
Vectoring technology also decouples the lines in a cable (from an interference point of view), substantially improving power management, which can reduce power consumption.
Standards for VDSL2 and line bonding are available today. The standardisation of vectoring is ongoing and is expected by the end of 2009.
VDSL2-based technology offers unprecedented speeds on existing copper lines, opening up new opportunities for operators to provide customers with broadband services such as IPTV. It also makes it possible to use existing copper networks as a backhaul for radio base stations, accelerating future rollout of HSPA and LTE-based high-speed mobile broadband services, according to Ericsson CTO HÃ¥kan Eriksson.
But don't expect it to be a technology of choice for Australia's National Broadband Network (NBN).
Colin Goodwin, strategic market manager for Ericsson Australia said the technology offers incredible speeds, but over relatively short distances.
"Its speed is best over thye hundreds of metres," he said. "But beyond 1km you will find that ADSL2+ is actually faster."
The technology might have been applicable to improving last mile speeds in a Fibre-to-the-Node deployment, he said, but Australian homes do not tend to have a great deal of spare copper in the last mile to fuse together.
"Relatively few residential subscribers would have the opportunity of having multiple copper pairs to their homes," he said.
The technology would also be irrelevant to Fibre-to-the-Home deployments, as fibre tends to be cheaper than copper for new roll-outs.
Where the technology does have great applications is among Fibre-to-the-Building deployments in commercial areas.
"You might have fibre connected from the DSLAM to the basement of an office building," Goodwin said. "You can then run bonded VDSL2+ up into all the other floors."
Ericsson Corporate Public & Media Relations
Phone: +46 10 719 69 92
E-mail: press.relations@ericsson.com
Ericsson has achieved data transfer rates of more than 500Mbps in what it said is the world's first live demonstration of a new VDSL2-based technology.
The demonstration achieved data rates of more than 0.5 Gbps over twisted copper pairs using "vectorised" VDSL2, the latest technology for line bonding and crosstalk cancellation.
It showed aggregated rates of above 0.5Gbps at 500 metres, bonding six lines.
Vectorised VDSL2 is said to enable extremely high end-to-end transmission rates, improving VDSL2 performance by reducing noise originating from the other copper pairs in the same cable bundle.
This increases capacity and reach, boosting the number of customers that can be connected.
Vectoring technology also decouples the lines in a cable (from an interference point of view), substantially improving power management, which can reduce power consumption.
Standards for VDSL2 and line bonding are available today. The standardisation of vectoring is ongoing and is expected by the end of 2009.
VDSL2-based technology offers unprecedented speeds on existing copper lines, opening up new opportunities for operators to provide customers with broadband services such as IPTV. It also makes it possible to use existing copper networks as a backhaul for radio base stations, accelerating future rollout of HSPA and LTE-based high-speed mobile broadband services, according to Ericsson CTO HÃ¥kan Eriksson.
But don't expect it to be a technology of choice for Australia's National Broadband Network (NBN).
Colin Goodwin, strategic market manager for Ericsson Australia said the technology offers incredible speeds, but over relatively short distances.
"Its speed is best over thye hundreds of metres," he said. "But beyond 1km you will find that ADSL2+ is actually faster."
The technology might have been applicable to improving last mile speeds in a Fibre-to-the-Node deployment, he said, but Australian homes do not tend to have a great deal of spare copper in the last mile to fuse together.
"Relatively few residential subscribers would have the opportunity of having multiple copper pairs to their homes," he said.
The technology would also be irrelevant to Fibre-to-the-Home deployments, as fibre tends to be cheaper than copper for new roll-outs.
Where the technology does have great applications is among Fibre-to-the-Building deployments in commercial areas.
"You might have fibre connected from the DSLAM to the basement of an office building," Goodwin said. "You can then run bonded VDSL2+ up into all the other floors."
He Never Forgets: Meet the Super-Memory Man
Feb. 18, 1981 was the day Bob Petrella met his friend Susan Angelo.
"It was a Wednesday," he said.
Go inside the mind of a man who remembers everything.
He remembers. She doesn't.
In 1976, Petrella met his friend Tom Challis.
"I remember the first time we really talked, though, was New Year's Day 1978 when we watched Oakland and Denver," Petrella said. "It was over at Patty's house."
For the average person, the ability to recall the odd date -- a birthday, anniversary or reunion -- might not be that impressive. But Petrella has a different gift. He remembers almost everything.
Impressive Memory Surprises Friends
Petrella, 58, is only the fourth person in the United States discovered to have what has been described as a super-autobiographical memory. Give him a date or event and he's likely to remember it. Sometimes he remembers more about his friends' lives than they remember about their own.
"He called me, I swear, six years after I had met him," said Angelo. "I got a telephone message from him one day. He said happy anniversary, we met six years ago today."
"This guy's from another planet," said Challis. "Like '74 ... when Nixon was impeached, I think about ... graduating from high school. This guy, he remembers [that] it hailed one day in July or something that same year."
"It's Thursday when [Nixon] announced it," Patrella said.
"See what I'm saying," said Challis.
Petrella lives a fairly normal life, working in Los Angeles as a producer for the Tennis Channel on cable television. Some people who have known him for years are still stunned by his memory.
The day Princess Diana was killed?
"That was a Saturday and it was Aug. 30, 1997," he said. "I just remember sitting at home and turning [on] CNN or whatever. It was all over the news ... and then the next day the Steelers lost to Dallas, 37-7, which was Aug. 31."
March 30, 1981?
"Reagan was shot, and that night Indiana beat North Carolina for the NCAA championship. Isaiah Thomas played for Indiana and James Worthy and Sam Parkins played for North Carolina. It was a year before Michael Jordan joined the team."
Aug. 15, 1969?
"That was Woodstock. That was a Friday," he said.
Memory Potential Is Infinite
Petrella's memory is a mixture of personal experiences and verifiable public events. He leans toward sports, but historical dates are embedded in his brain as well.
It's a mystery how he does it.
"We don't know how it works, and we would like to know how it works," said Dr. James McGaugh, the founding director of the Center for the Neurobiology of Learning and Memory at the University of California, Irvine.
Petrella and the three others with super memory have been the subjects of study at the center.
"These are not learning machines. These are not people with so-called photographic memory," said McGaugh. "These are people who learn certain things about their lives and don't forget."
The doctors have screened about 2,000 people with 60 questions that only those with super memory have a chance of answering.
Petrella got 30 of 60 dead right. The best known of the four super-memory people is Jill Price, also of Los Angeles, who wrote a book called "The Woman Who Can't Forget."
"I always explain to people [that it's] like I'm walking around with a video camera on my shoulder and every day is a videotape," Price told ABC News last year. "So if you throw a date out at me, it's as if I pulled the videotape out, put it in the VCR and just watched the day as it happened, like from my point of view."
Doctors are just beginning to observe, let alone understand, this phenomenon.
"First, three of our four top subjects are left-handed, and our fourth has strong tendencies to be left-handed [but] uses a right hand in writing," said McGaugh. "They all have slightly obsessive tendencies. They save a lot of things. They keep a lot of things. Salvation Army will never get rich off these people because they keep it, and so they covet collections the way they covet their memories. We find that interesting."
Also, it turns out certain parts of the super-autobiographical memory subjects' brains are larger than they are in people who don't have super-autobiographical memory. Also, their potential to store information appears infinite.
"There's no capacity limitation on what we can learn," said McGaugh, "no limit to our capacity to learn."
Memory: 'It's Like a Hard Drive'
The remembering also is completely unintentional.
Petrella remembers schoolboy sports events in Pennsylvania and that he got glasses in 1956. He remembers all but two of his birthdays since he turned 5. He recalls where he was and what he did with high school buddies. Grainy images of the 1970s are vivid pictures in his head. "I remember all my ATM codes," he said. "I remember people's numbers. [I] lost my cell phone Sept. 24, 2006. A lot of people, if they lost their cell phone, they would panic because they have all these numbers. I didn't have any numbers in my cell phone because I know everybody's numbers up here [in my head]."
"It's like a hard drive," he said. "You want to throw some of these dates in the trash and put more, maybe some creative things on -- because they are some inane things, a lot of things. Sometimes that's a bad thing, because when I am going through ... a bad situation or a bad circumstance. And then I go back and I go, 'boy, this is how I felt on, say, May 3, 1986."
At the same time, Petrella has the kind of forgetfulness anyone can have. He'll walk into another room and forget why he entered. Or he'll forget that he left his car in a tow zone.
Petrella is most astounding at sports events. If shown a freeze frame from a game 35 years ago, he'll recall details of the sporting event.
And he knows just about everything when it comes to his beloved Pittsburgh Steelers.
"Oh, that was my most memorable Super Bowl," he said when asked about the Steelers' third Super Bowl win. "Jan. 21, 1979, 35-31, over Dallas. Terry Bradshaw was the most valuable player. Threw for 318 yards and four touchdowns."
"It was a Wednesday," he said.
Go inside the mind of a man who remembers everything.
He remembers. She doesn't.
In 1976, Petrella met his friend Tom Challis.
"I remember the first time we really talked, though, was New Year's Day 1978 when we watched Oakland and Denver," Petrella said. "It was over at Patty's house."
For the average person, the ability to recall the odd date -- a birthday, anniversary or reunion -- might not be that impressive. But Petrella has a different gift. He remembers almost everything.
Impressive Memory Surprises Friends
Petrella, 58, is only the fourth person in the United States discovered to have what has been described as a super-autobiographical memory. Give him a date or event and he's likely to remember it. Sometimes he remembers more about his friends' lives than they remember about their own.
"He called me, I swear, six years after I had met him," said Angelo. "I got a telephone message from him one day. He said happy anniversary, we met six years ago today."
"This guy's from another planet," said Challis. "Like '74 ... when Nixon was impeached, I think about ... graduating from high school. This guy, he remembers [that] it hailed one day in July or something that same year."
"It's Thursday when [Nixon] announced it," Patrella said.
"See what I'm saying," said Challis.
Petrella lives a fairly normal life, working in Los Angeles as a producer for the Tennis Channel on cable television. Some people who have known him for years are still stunned by his memory.
The day Princess Diana was killed?
"That was a Saturday and it was Aug. 30, 1997," he said. "I just remember sitting at home and turning [on] CNN or whatever. It was all over the news ... and then the next day the Steelers lost to Dallas, 37-7, which was Aug. 31."
March 30, 1981?
"Reagan was shot, and that night Indiana beat North Carolina for the NCAA championship. Isaiah Thomas played for Indiana and James Worthy and Sam Parkins played for North Carolina. It was a year before Michael Jordan joined the team."
Aug. 15, 1969?
"That was Woodstock. That was a Friday," he said.
Memory Potential Is Infinite
Petrella's memory is a mixture of personal experiences and verifiable public events. He leans toward sports, but historical dates are embedded in his brain as well.
It's a mystery how he does it.
"We don't know how it works, and we would like to know how it works," said Dr. James McGaugh, the founding director of the Center for the Neurobiology of Learning and Memory at the University of California, Irvine.
Petrella and the three others with super memory have been the subjects of study at the center.
"These are not learning machines. These are not people with so-called photographic memory," said McGaugh. "These are people who learn certain things about their lives and don't forget."
The doctors have screened about 2,000 people with 60 questions that only those with super memory have a chance of answering.
Petrella got 30 of 60 dead right. The best known of the four super-memory people is Jill Price, also of Los Angeles, who wrote a book called "The Woman Who Can't Forget."
"I always explain to people [that it's] like I'm walking around with a video camera on my shoulder and every day is a videotape," Price told ABC News last year. "So if you throw a date out at me, it's as if I pulled the videotape out, put it in the VCR and just watched the day as it happened, like from my point of view."
Doctors are just beginning to observe, let alone understand, this phenomenon.
"First, three of our four top subjects are left-handed, and our fourth has strong tendencies to be left-handed [but] uses a right hand in writing," said McGaugh. "They all have slightly obsessive tendencies. They save a lot of things. They keep a lot of things. Salvation Army will never get rich off these people because they keep it, and so they covet collections the way they covet their memories. We find that interesting."
Also, it turns out certain parts of the super-autobiographical memory subjects' brains are larger than they are in people who don't have super-autobiographical memory. Also, their potential to store information appears infinite.
"There's no capacity limitation on what we can learn," said McGaugh, "no limit to our capacity to learn."
Memory: 'It's Like a Hard Drive'
The remembering also is completely unintentional.
Petrella remembers schoolboy sports events in Pennsylvania and that he got glasses in 1956. He remembers all but two of his birthdays since he turned 5. He recalls where he was and what he did with high school buddies. Grainy images of the 1970s are vivid pictures in his head. "I remember all my ATM codes," he said. "I remember people's numbers. [I] lost my cell phone Sept. 24, 2006. A lot of people, if they lost their cell phone, they would panic because they have all these numbers. I didn't have any numbers in my cell phone because I know everybody's numbers up here [in my head]."
"It's like a hard drive," he said. "You want to throw some of these dates in the trash and put more, maybe some creative things on -- because they are some inane things, a lot of things. Sometimes that's a bad thing, because when I am going through ... a bad situation or a bad circumstance. And then I go back and I go, 'boy, this is how I felt on, say, May 3, 1986."
At the same time, Petrella has the kind of forgetfulness anyone can have. He'll walk into another room and forget why he entered. Or he'll forget that he left his car in a tow zone.
Petrella is most astounding at sports events. If shown a freeze frame from a game 35 years ago, he'll recall details of the sporting event.
And he knows just about everything when it comes to his beloved Pittsburgh Steelers.
"Oh, that was my most memorable Super Bowl," he said when asked about the Steelers' third Super Bowl win. "Jan. 21, 1979, 35-31, over Dallas. Terry Bradshaw was the most valuable player. Threw for 318 yards and four touchdowns."
Sunday, March 15
If Hacker get Accident

The story behind this is that Jerry had a motorcycle accident last May and lost a finger. When the doctor working on the artificial finger heard he is a hacker, the immediate suggestion was to embed a USB "finger drive" to the design. Now he carries a Billix Linux distribution and the Freddy Got Fingered movie as part of his hand.
Saturday, March 14
Differences between IE8 Compatibility View and IE7
Microsoft or IE8 Teams need feedback from you or community if finding broken site.
at this time.some differences has found between IE7 and IE8.
Cross Document Communication
Hacks enabling cross-domain, cross-document communication have been disabled for security reasons.
SOLUTION: Use Cross Document Messaging (XDM) to work around this change.
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
Extending the Event Object
IE exposes new properties for certain AJAX features such as Cross Document Messaging (XDM), even in Compatibility View. Adding custom properties to the Event object can conflict with these new properties, such as "source".
event.source = myObject; // Read-only in IE8
SOLUTION: Change the names of conflicting custom properties to avoid collision.
event.mySource = myObject
Attribute Ordering
The ordering of attributes has changed, affecting the attributes collection as well as the values of innerHTML and outerHTML. Pages depending on a specific attribute ordering may break.
attr = elm.attributes[1]; // May differ in IE8
SOLUTION: Reference attributes by name as opposed to their position within the attributes collection.
attr = elm.attributes["id"];
Setting Unsupported CSS Values
Assigning CSS values that were unsupported in IE7 but are supported in IE8 Standards Mode will not generate exceptions in IE8 Compatibility View. Some sites use these exceptions to determine if a particular value for a CSS property is supported or not.
try {
elm.style.display = "table-cell";
} catch(e) {
// This executes in IE7,
// but not IE8, regardless of mode
}
SOLUTION: Short of version detection, this is a difficult issue to work around. If this behavior is essential to a page, updating the page to run in IE8 Standards Mode may be the best approach.
at this time.some differences has found between IE7 and IE8.
Cross Document Communication
Hacks enabling cross-domain, cross-document communication have been disabled for security reasons.
SOLUTION: Use Cross Document Messaging (XDM) to work around this change.
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
Extending the Event Object
IE exposes new properties for certain AJAX features such as Cross Document Messaging (XDM), even in Compatibility View. Adding custom properties to the Event object can conflict with these new properties, such as "source".
event.source = myObject; // Read-only in IE8
SOLUTION: Change the names of conflicting custom properties to avoid collision.
event.mySource = myObject
Attribute Ordering
The ordering of attributes has changed, affecting the attributes collection as well as the values of innerHTML and outerHTML. Pages depending on a specific attribute ordering may break.
attr = elm.attributes[1]; // May differ in IE8
SOLUTION: Reference attributes by name as opposed to their position within the attributes collection.
attr = elm.attributes["id"];
Setting Unsupported CSS Values
Assigning CSS values that were unsupported in IE7 but are supported in IE8 Standards Mode will not generate exceptions in IE8 Compatibility View. Some sites use these exceptions to determine if a particular value for a CSS property is supported or not.
try {
elm.style.display = "table-cell";
} catch(e) {
// This executes in IE7,
// but not IE8, regardless of mode
}
SOLUTION: Short of version detection, this is a difficult issue to work around. If this behavior is essential to a page, updating the page to run in IE8 Standards Mode may be the best approach.
Sunday, March 8
Cable Companies Target Commercials to Audience
The advertiser’s dream of sending a particular commercial to a specific consumer is one step closer to reality as Cablevision Systems plans to announce the largest project yet using targeted advertising on television.
Beginning with 500,000 homes in Brooklyn, the Bronx and some New Jersey areas, Cablevision will use its targeting technology to route ads to specific households based on data about income, ethnicity, gender or whether the homeowner has children or pets.
The technology requires no hardware or installation in a subscriber’s home, so viewers may not realize they are seeing ads different from a neighbor’s. But during the same show, a 50-something male may see an ad for, say, high-end speakers from Best Buy, while his neighbors with children may see one for a Best Buy video game.
“We have, as an industry, been talking about this since the beginning of time,” said Matt Seiler, the global chief executive of the media firm Universal McCann, a part of the Interpublic Group. “Now we’ve got it in 500,000 households. This is real.”
The potential of customized ads worries some privacy advocates, despite the assurance of cable companies that they maintain anonymity about the households.
“We don’t have an objection to advertising that is targeted to demographics,” said Marc Rotenberg, the executive director of the Electronic Privacy Information Center, a civil liberties group in Washington. But, he said, there is a need to show “that they can’t be reverse-engineered to find the names of individuals that were watching particular shows.”
Cablevision says it segments its subscribers only by demographics, so that an advertiser can divide ads among various groups: General Motors, for example, could send an ad for a Cadillac Escalade to high-income houses, a Chevrolet to low-income houses, and one in Spanish to Hispanic consumers.
Cablevision matches households to demographic data to divide its customers, using the data-collection company Experian.
Experian has data on individuals that it collects through public records, registries and other sources. It matches the name and address of the subscriber to what it knows about them, and assigns demographic characteristics to households. (The match is a blind one: advertisers do not know what name and address they are advertising to, Cablevision executives said.)
Advertisers can also give their existing customer lists to Experian, and Experian can make matches — so G.M., for example, could direct an ad based on who already owns a G.M. car.
Advertisers are willing to pay premiums for ads that go only to audiences they have selected.
Cablevision tested the technology by promoting its own services with targeted and untargeted ads. In the eight-month test, the targeted ads brought in new subscriptions at a significantly higher rate than untargeted ads.
“The revenue opportunity for the various constituents within television is enormous,” said Irwin Gotlieb, the global chief executive of GroupM, the media division of WPP Group. (WPP is an investor in the targeting companies Visible World and the Invidi Technologies Corporation.)
That is money the cable companies are eager to have. “Penetrations have flattened out, and cable companies need a way to grow,” said David L. Kline, the president of the Rainbow Advertising Sales Corporation, Cablevision’s ad unit.
Cablevision has been testing the system in about 100,000 Brooklyn households over the last year and a half. By summer, Cablevision plans to have it in 500,000 households, and, if the introduction goes smoothly, to extend it to all 3.1 million of its cable subscribers.
Visible World, the New York-based company working on the Cablevision project, was founded in 2000. It initially worked on showing versions of ads based on the weather or general location. Then, Visible World began working on the capability of sending different ads to specific households, starting with Brooklyn.
Cablevision is not notifying customers about the targeted advertising specifically. It last sent its privacy policy, which included information about ad targeting, last May, said a spokesman, Jim Maiella. The privacy policy is also available online.
Jeffrey Chester, the executive director of the privacy group Center for Digital Democracy, said this was not enough. “They need to be very clear to the consumer what’s being collected,” he said. “Give people a choice.”
One thing Cablevision will not be doing is sending ads based on what shows a consumer is watching.
But a competitor of Visible World, Invidi, is conducting a test with the cable company Comcast and will soon work with Verizon. It uses data from remote controls to follow what a person is watching, then matches that with ratings information and program guides to infer that person’s gender and age. It can use census data or data sources like Experian for further refining. Then, it shows an appropriate commercial.
Eventually, said Michael Kubin, the executive vice president of Invidi, the company will be able to identify who is watching based not just on what they are viewing, but also how they watch it: whether they channel change frequently or not at all, or immediately turn to CNN or to Bravo. That will help it show the right ads in households where multiple people watch television.
Mr. Kubin said Invidi did not have the capability to store any data, and could not, even if subpoenaed, tell what programs someone was watching.
But Invidi’s access to data has raised some concerns among even its advertisers. In late 2008, Invidi began conducting a test in Baltimore with Comcast, with about 70,000 households.
Comcast sent letters to all households in the trial area when the test began, alerting them to the trial and giving them an option to decline participation.
Advertisers wanted even more caution. While Invidi could have used the remote-control data to target ads, Starcom MediaVest Group, a media unit of Publicis Group, asked it not to.
“We want to make sure that we took a very conservative approach toward data usage until we have an opportunity as an industry to understand the consumer’s desire for more relevant advertising,” said Tracey Scheppach, senior vice president and video innovations director at Starcom Worldwide.
While advertisers are pushing the cable industry to begin offering targeted advertising, it has been a slow process. Cable companies control only a portion of advertising — the bulk is sold by the networks, like ESPN or MTV.
To coordinate their efforts, last year the six largest cable companies announced they had created an entity called Canoe Ventures. It is trying to get national distribution for the targeting technologies, to ensure the networks support targeted ad sales, and to come up with industry standards.
“Television was always big and dumb,” said Seth Haberman, the chief executive of Visible World. “Now, hopefully, we can be big and slightly smarter.”
Beginning with 500,000 homes in Brooklyn, the Bronx and some New Jersey areas, Cablevision will use its targeting technology to route ads to specific households based on data about income, ethnicity, gender or whether the homeowner has children or pets.
The technology requires no hardware or installation in a subscriber’s home, so viewers may not realize they are seeing ads different from a neighbor’s. But during the same show, a 50-something male may see an ad for, say, high-end speakers from Best Buy, while his neighbors with children may see one for a Best Buy video game.
“We have, as an industry, been talking about this since the beginning of time,” said Matt Seiler, the global chief executive of the media firm Universal McCann, a part of the Interpublic Group. “Now we’ve got it in 500,000 households. This is real.”
The potential of customized ads worries some privacy advocates, despite the assurance of cable companies that they maintain anonymity about the households.
“We don’t have an objection to advertising that is targeted to demographics,” said Marc Rotenberg, the executive director of the Electronic Privacy Information Center, a civil liberties group in Washington. But, he said, there is a need to show “that they can’t be reverse-engineered to find the names of individuals that were watching particular shows.”
Cablevision says it segments its subscribers only by demographics, so that an advertiser can divide ads among various groups: General Motors, for example, could send an ad for a Cadillac Escalade to high-income houses, a Chevrolet to low-income houses, and one in Spanish to Hispanic consumers.
Cablevision matches households to demographic data to divide its customers, using the data-collection company Experian.
Experian has data on individuals that it collects through public records, registries and other sources. It matches the name and address of the subscriber to what it knows about them, and assigns demographic characteristics to households. (The match is a blind one: advertisers do not know what name and address they are advertising to, Cablevision executives said.)
Advertisers can also give their existing customer lists to Experian, and Experian can make matches — so G.M., for example, could direct an ad based on who already owns a G.M. car.
Advertisers are willing to pay premiums for ads that go only to audiences they have selected.
Cablevision tested the technology by promoting its own services with targeted and untargeted ads. In the eight-month test, the targeted ads brought in new subscriptions at a significantly higher rate than untargeted ads.
“The revenue opportunity for the various constituents within television is enormous,” said Irwin Gotlieb, the global chief executive of GroupM, the media division of WPP Group. (WPP is an investor in the targeting companies Visible World and the Invidi Technologies Corporation.)
That is money the cable companies are eager to have. “Penetrations have flattened out, and cable companies need a way to grow,” said David L. Kline, the president of the Rainbow Advertising Sales Corporation, Cablevision’s ad unit.
Cablevision has been testing the system in about 100,000 Brooklyn households over the last year and a half. By summer, Cablevision plans to have it in 500,000 households, and, if the introduction goes smoothly, to extend it to all 3.1 million of its cable subscribers.
Visible World, the New York-based company working on the Cablevision project, was founded in 2000. It initially worked on showing versions of ads based on the weather or general location. Then, Visible World began working on the capability of sending different ads to specific households, starting with Brooklyn.
Cablevision is not notifying customers about the targeted advertising specifically. It last sent its privacy policy, which included information about ad targeting, last May, said a spokesman, Jim Maiella. The privacy policy is also available online.
Jeffrey Chester, the executive director of the privacy group Center for Digital Democracy, said this was not enough. “They need to be very clear to the consumer what’s being collected,” he said. “Give people a choice.”
One thing Cablevision will not be doing is sending ads based on what shows a consumer is watching.
But a competitor of Visible World, Invidi, is conducting a test with the cable company Comcast and will soon work with Verizon. It uses data from remote controls to follow what a person is watching, then matches that with ratings information and program guides to infer that person’s gender and age. It can use census data or data sources like Experian for further refining. Then, it shows an appropriate commercial.
Eventually, said Michael Kubin, the executive vice president of Invidi, the company will be able to identify who is watching based not just on what they are viewing, but also how they watch it: whether they channel change frequently or not at all, or immediately turn to CNN or to Bravo. That will help it show the right ads in households where multiple people watch television.
Mr. Kubin said Invidi did not have the capability to store any data, and could not, even if subpoenaed, tell what programs someone was watching.
But Invidi’s access to data has raised some concerns among even its advertisers. In late 2008, Invidi began conducting a test in Baltimore with Comcast, with about 70,000 households.
Comcast sent letters to all households in the trial area when the test began, alerting them to the trial and giving them an option to decline participation.
Advertisers wanted even more caution. While Invidi could have used the remote-control data to target ads, Starcom MediaVest Group, a media unit of Publicis Group, asked it not to.
“We want to make sure that we took a very conservative approach toward data usage until we have an opportunity as an industry to understand the consumer’s desire for more relevant advertising,” said Tracey Scheppach, senior vice president and video innovations director at Starcom Worldwide.
While advertisers are pushing the cable industry to begin offering targeted advertising, it has been a slow process. Cable companies control only a portion of advertising — the bulk is sold by the networks, like ESPN or MTV.
To coordinate their efforts, last year the six largest cable companies announced they had created an entity called Canoe Ventures. It is trying to get national distribution for the targeting technologies, to ensure the networks support targeted ad sales, and to come up with industry standards.
“Television was always big and dumb,” said Seth Haberman, the chief executive of Visible World. “Now, hopefully, we can be big and slightly smarter.”
Why Tv Lost
About twenty years ago people noticed computers and TV were on a collision course and started to speculate about what they'd produce when they converged. We now know the answer: computers. It's clear now that even by using the word "convergence" we were giving TV too much credit. This won't be convergence so much as replacement. People may still watch things they call "TV shows," but they'll watch them mostly on computers.
What decided the contest for computers? Four forces, three of which one could have predicted, and one that would have been harder to.
One predictable cause of victory is that the Internet is an open platform. Anyone can build whatever they want on it, and the market picks the winners. So innovation happens at hacker speeds instead of big company speeds.
The second is Moore's Law, which has worked its usual magic on Internet bandwidth. [1]
The third reason computers won is piracy. Users prefer it not just because it's free, but because it's more convenient. Bittorrent and YouTube have already trained a new generation of viewers that the place to watch shows is on a computer screen. [2]
The somewhat more surprising force was one specific type of innovation: social applications. The average teenage kid has a pretty much infinite capacity for talking to their friends. But they can't physically be with them all the time. When I was in high school the solution was the telephone. Now it's social networks, multiplayer games, and various messaging applications. The way you reach them all is through a computer. [3] Which means every teenage kid (a) wants a computer with an Internet connection, (b) has an incentive to figure out how to use it, and (c) spends countless hours in front of it.
This was the most powerful force of all. This was what made everyone want computers. Nerds got computers because they liked them. Then gamers got them to play games on. But it was connecting to other people that got everyone else: that's what made even grandmas and 14 year old girls want computers.
After decades of running an IV drip right into their audience, people in the entertainment business had understandably come to think of them as rather passive. They thought they'd be able to dictate the way shows reached audiences. But they underestimated the force of their desire to connect with one another.
Facebook killed TV. That is wildly oversimplified, of course, but probably as close to the truth as you can get in three words.
___
The TV networks already seem, grudgingly, to see where things are going, and have responded by putting their stuff, grudgingly, online. But they're still dragging their heels. They still seem to wish people would watch shows on TV instead, just as newspapers that put their stories online still seem to wish people would wait till the next morning and read them printed on paper. They should both just face the fact that the Internet is the primary medium.
They'd be in a better position if they'd done that earlier. When a new medium arises that's powerful enough to make incumbents nervous, then it's probably powerful enough to win, and the best thing they can do is jump in immediately.
Whether they like it or not, big changes are coming, because the Internet dissolves the two cornerstones of broadcast media: synchronicity and locality. On the Internet, you don't have to send everyone the same signal, and you don't have to send it to them from a local source. People will watch what they want when they want it, and group themselves according to whatever shared interest they feel most strongly. Maybe their strongest shared interest will be their physical location, but I'm guessing not. Which means local TV is probably dead. It was an artifact of limitations imposed by old technology. If someone were creating an Internet-based TV company from scratch now, they might have some plan for shows aimed at specific regions, but it wouldn't be a top priority.
Synchronicity and locality are tied together. TV network affiliates care what's on at 10 because that delivers viewers for local news at 11. This connection adds more brittleness than strength, however: people don't watch what's on at 10 because they want to watch the news afterward.
TV networks will fight these trends, because they don't have sufficient flexibility to adapt to them. They're hemmed in by local affiliates in much the same way car companies are hemmed in by dealers and unions. Inevitably, the people running the networks will take the easy route and try to keep the old model running for a couple more years, just as the record labels have done.
A recent article in the Wall Street Journal described how TV networks were trying to add more live shows, partly as a way to make viewers watch TV synchronously instead of watching recorded shows when it suited them. Instead of delivering what viewers want, they're trying to force them to change their habits to suit the networks' obsolete business model. That never works unless you have a monopoly or cartel to enforce it, and even then it only works temporarily.
The other reason networks like live shows is that they're cheaper to produce. There they have the right idea, but they haven't followed it to its conclusion. Live content can be way cheaper than networks realize, and the way to take advantage of dramatic decreases in cost is to increase volume. The networks are prevented from seeing this whole line of reasoning because they still think of themselves as being in the broadcast business—as sending one signal to everyone. [4]
___
Now would be a good time to start any company that competes with TV networks. That's what a lot of Internet startups are, though they may not have had this as an explicit goal. People only have so many leisure hours a day, and TV is premised on such long sessions (unlike Google, which prides itself on sending users on their way quickly) that anything that takes up their time is competing with it. But in addition to such indirect competitors, I think TV companies will increasingly face direct ones.
Even in cable TV, the long tail was lopped off prematurely by the threshold you had to get over to start a new channel. It will be longer on the Internet, and there will be more mobility within it. In this new world, the existing players will only have the advantages any big company has in its market.
That will change the balance of power between the networks and the people who produce shows. The networks used to be gatekeepers. They distributed your work, and sold advertising on it. Now the people who produce a show can distribute it themselves. The main value networks supply now is ad sales. Which will tend to put them in the position of service providers rather than publishers.
Shows will change even more. On the Internet there's no reason to keep their current format, or even the fact that they have a single format. Indeed, the more interesting sort of convergence that's coming is between shows and games. But on the question of what sort of entertainment gets distributed on the Internet in 20 years, I wouldn't dare to make any predictions, except that things will change a lot. We'll get whatever the most imaginative people can cook up. That's why the Internet won.
Notes
[1] Thanks to Trevor Blackwell for this point. He adds: "I remember the eyes of phone companies gleaming in the early 90s when they talked about convergence. They thought most programming would be on demand, and they would implement it and make a lot of money. It didn't work out. They assumed that their local network infrastructure would be critical to do video on-demand, because you couldn't possibly stream it from a few data centers over the internet. At the time (1992) the entire cross-country Internet bandwidth wasn't enough for one video stream. But wide-area bandwidth increased more than they expected and they were beaten by iTunes and Hulu."
[2] Copyright owners tend to focus on the aspect they see of piracy, which is the lost revenue. They therefore think what drives users to do it is the desire to get something for free. But iTunes shows that people will pay for stuff online, if you make it easy. A significant component of piracy is simply that it offers a better user experience.
[3] Or a phone that is actually a computer. I'm not making any predictions about the size of the device that will replace TV, just that it will have a browser and get data via the Internet.
[4] Emmett Shear writes: "I'd argue the long tail for sports may be even larger than the long tail for other kinds of content. Anyone can broadcast a high school football game that will be interesting to 10,000 people or so, even if the quality of production is not so good."
Thanks to Sam Altman, Trevor Blackwell, Nancy Cook, Michael Seibel. Emmett Shear, and Fred Wilson for reading drafts of this.
What decided the contest for computers? Four forces, three of which one could have predicted, and one that would have been harder to.
One predictable cause of victory is that the Internet is an open platform. Anyone can build whatever they want on it, and the market picks the winners. So innovation happens at hacker speeds instead of big company speeds.
The second is Moore's Law, which has worked its usual magic on Internet bandwidth. [1]
The third reason computers won is piracy. Users prefer it not just because it's free, but because it's more convenient. Bittorrent and YouTube have already trained a new generation of viewers that the place to watch shows is on a computer screen. [2]
The somewhat more surprising force was one specific type of innovation: social applications. The average teenage kid has a pretty much infinite capacity for talking to their friends. But they can't physically be with them all the time. When I was in high school the solution was the telephone. Now it's social networks, multiplayer games, and various messaging applications. The way you reach them all is through a computer. [3] Which means every teenage kid (a) wants a computer with an Internet connection, (b) has an incentive to figure out how to use it, and (c) spends countless hours in front of it.
This was the most powerful force of all. This was what made everyone want computers. Nerds got computers because they liked them. Then gamers got them to play games on. But it was connecting to other people that got everyone else: that's what made even grandmas and 14 year old girls want computers.
After decades of running an IV drip right into their audience, people in the entertainment business had understandably come to think of them as rather passive. They thought they'd be able to dictate the way shows reached audiences. But they underestimated the force of their desire to connect with one another.
Facebook killed TV. That is wildly oversimplified, of course, but probably as close to the truth as you can get in three words.
___
The TV networks already seem, grudgingly, to see where things are going, and have responded by putting their stuff, grudgingly, online. But they're still dragging their heels. They still seem to wish people would watch shows on TV instead, just as newspapers that put their stories online still seem to wish people would wait till the next morning and read them printed on paper. They should both just face the fact that the Internet is the primary medium.
They'd be in a better position if they'd done that earlier. When a new medium arises that's powerful enough to make incumbents nervous, then it's probably powerful enough to win, and the best thing they can do is jump in immediately.
Whether they like it or not, big changes are coming, because the Internet dissolves the two cornerstones of broadcast media: synchronicity and locality. On the Internet, you don't have to send everyone the same signal, and you don't have to send it to them from a local source. People will watch what they want when they want it, and group themselves according to whatever shared interest they feel most strongly. Maybe their strongest shared interest will be their physical location, but I'm guessing not. Which means local TV is probably dead. It was an artifact of limitations imposed by old technology. If someone were creating an Internet-based TV company from scratch now, they might have some plan for shows aimed at specific regions, but it wouldn't be a top priority.
Synchronicity and locality are tied together. TV network affiliates care what's on at 10 because that delivers viewers for local news at 11. This connection adds more brittleness than strength, however: people don't watch what's on at 10 because they want to watch the news afterward.
TV networks will fight these trends, because they don't have sufficient flexibility to adapt to them. They're hemmed in by local affiliates in much the same way car companies are hemmed in by dealers and unions. Inevitably, the people running the networks will take the easy route and try to keep the old model running for a couple more years, just as the record labels have done.
A recent article in the Wall Street Journal described how TV networks were trying to add more live shows, partly as a way to make viewers watch TV synchronously instead of watching recorded shows when it suited them. Instead of delivering what viewers want, they're trying to force them to change their habits to suit the networks' obsolete business model. That never works unless you have a monopoly or cartel to enforce it, and even then it only works temporarily.
The other reason networks like live shows is that they're cheaper to produce. There they have the right idea, but they haven't followed it to its conclusion. Live content can be way cheaper than networks realize, and the way to take advantage of dramatic decreases in cost is to increase volume. The networks are prevented from seeing this whole line of reasoning because they still think of themselves as being in the broadcast business—as sending one signal to everyone. [4]
___
Now would be a good time to start any company that competes with TV networks. That's what a lot of Internet startups are, though they may not have had this as an explicit goal. People only have so many leisure hours a day, and TV is premised on such long sessions (unlike Google, which prides itself on sending users on their way quickly) that anything that takes up their time is competing with it. But in addition to such indirect competitors, I think TV companies will increasingly face direct ones.
Even in cable TV, the long tail was lopped off prematurely by the threshold you had to get over to start a new channel. It will be longer on the Internet, and there will be more mobility within it. In this new world, the existing players will only have the advantages any big company has in its market.
That will change the balance of power between the networks and the people who produce shows. The networks used to be gatekeepers. They distributed your work, and sold advertising on it. Now the people who produce a show can distribute it themselves. The main value networks supply now is ad sales. Which will tend to put them in the position of service providers rather than publishers.
Shows will change even more. On the Internet there's no reason to keep their current format, or even the fact that they have a single format. Indeed, the more interesting sort of convergence that's coming is between shows and games. But on the question of what sort of entertainment gets distributed on the Internet in 20 years, I wouldn't dare to make any predictions, except that things will change a lot. We'll get whatever the most imaginative people can cook up. That's why the Internet won.
Notes
[1] Thanks to Trevor Blackwell for this point. He adds: "I remember the eyes of phone companies gleaming in the early 90s when they talked about convergence. They thought most programming would be on demand, and they would implement it and make a lot of money. It didn't work out. They assumed that their local network infrastructure would be critical to do video on-demand, because you couldn't possibly stream it from a few data centers over the internet. At the time (1992) the entire cross-country Internet bandwidth wasn't enough for one video stream. But wide-area bandwidth increased more than they expected and they were beaten by iTunes and Hulu."
[2] Copyright owners tend to focus on the aspect they see of piracy, which is the lost revenue. They therefore think what drives users to do it is the desire to get something for free. But iTunes shows that people will pay for stuff online, if you make it easy. A significant component of piracy is simply that it offers a better user experience.
[3] Or a phone that is actually a computer. I'm not making any predictions about the size of the device that will replace TV, just that it will have a browser and get data via the Internet.
[4] Emmett Shear writes: "I'd argue the long tail for sports may be even larger than the long tail for other kinds of content. Anyone can broadcast a high school football game that will be interesting to 10,000 people or so, even if the quality of production is not so good."
Thanks to Sam Altman, Trevor Blackwell, Nancy Cook, Michael Seibel. Emmett Shear, and Fred Wilson for reading drafts of this.
Saturday, March 7
Ten Ways Hackers Breach Security
1-800-COURSES www.globalknowledge.com
Introduction
Hacking, cracking, and cyber crimes are hot topics these days and will continue to be for the foreseeable future.
However, there are steps you can take to reduce your organization's threat level. The first step is to understand
what risks, threats, and vulnerabilities currently exist in your environment. The second step is to learn as much
as possible about the problems so you can formulate a solid response. The third step is to intelligently deploy
your selected countermeasures and safeguards to erect protections around your most mission-critical assets. This
white paper discusses ten common methods hackers use to breach your existing security.
1. Stealing Passwords
Security experts have been discussing the problems with password security for years. But it seems that few
have listened and taken action to resolve those problems. If your IT environment controls authentication using
passwords only, it is at greater risk for intrusion and hacking attacks than those that use some form of multifactor
authentication.
The problem lies with the ever-increasing abilities of computers to process larger amounts of data in a smaller
amount of time. A password is just a string of characters, typically only keyboard characters, which a person
must remember and type into a computer terminal when required. Unfortunately, passwords that are too complex
for a person to remember easily can be discovered by a cracking tool in a frighteningly short period of
time. Dictionary attacks, brute force attacks, and hybrid attacks are all various methods used to guess or crack
passwords. The only real protection against such threats is to make very long passwords or use multiple factors
for authentication. Unfortunately, requiring ever longer passwords causes a reversing of security due to the
human factor. People simply are not equipped to remember numerous long strings of chaotic characters.
But even with reasonably long passwords that people can remember, such as 12 to 16 characters, there are
still other problems facing password-only authentication systems. These include:
• People who use the same password on multiple accounts, especially when some of those accounts are
on public Internet sites with little to no security.
• People who write their passwords down and store them in obvious places. Writing down passwords is
often encouraged by the need to frequently change passwords.
• The continued use of insecure protocols that transfer passwords in clear text, such as those used for
Web surfing, e-mail, chat, file transfer, etc.
• The threat of software and hardware keystroke loggers.
• The problem of shoulder surfing or video surveillance.
James Michael Steward, Global Knowledge Instructor
Ten Ways Hackers Breach Security
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 2
Password theft, password cracking, and even password guessing are still serious threats to IT environments.
The best protection against these threats is to deploy multifactor authentication systems and to train personnel
regarding safe password habits.
2.Trojan Horses
A Trojan horse is a continuing threat to all forms of IT communication. Basically, a Trojan horse is a malicious
payload surreptitiously delivered inside a benign host. You are sure to have heard of some of the famous
Trojan horse malicious payloads such as Back Orifice, NetBus, and SubSeven. But the real threat of Trojan horses
is not the malicious payloads you know about, its ones you don't. A Trojan horse can be built or crafted by
anyone with basic computer skills. Any malicious payload can be combined with any benign software to create
a Trojan horse. There are countless ways of crafting and authoring tools designed to do just that. Thus, the real
threat of Trojan horse attack is the unknown.
The malicious payload of a Trojan horse can be anything. This includes programs that destroy hard drives, corrupt
files, record keystrokes, monitor network traffic, track Web usage, duplicate e-mails, allow remote control
and remote access, transmit data files to others, launch attacks against other targets, plant proxy servers, host
file sharing services, and more. Payloads can be grabbed off the Internet or can be just written code authored
by the hacker. Then, this payload can be embedded into any benign software to create the Trojan horse.
Common hosts include games, screensavers, greeting card systems, admin utilities, archive formats, and even
documents.
All a Trojan horse attack needs to be successful is a single user to execute the host program. Once that is
accomplished, the malicious payload is automatically launched as well, usually without any symptoms of
unwanted activity. A Trojan horse could be delivered via e-mail as an attachment, it could be presented on a
Web site as a download, or it could be placed on a removable media (memory card, CD/DVD, USB stick, floppy,
etc.). In any case, your protections are automated malicious code detection tools, such as modern anti-virus
protections and other specific forms of malware scanners, and user education.
3. Exploiting Defaults
Nothing makes attacking a target network easier than when that target is using the defaults set by the vendor
or manufacturer. Many attack tools and exploit scripts assume that the target is configured using the default
settings. Thus, one of the most effective and often overlooked security precautions is simply to change the
defaults.
To see the scope of this problem, all you need to do is search the Internet for sites using the keywords "default
passwords". There are numerous sites that catalog all of the default user names, passwords, access codes, settings,
and naming conventions of every software and hardware IT product ever sold. It is your responsibility to
know about the defaults of the products you deploy and make every effort to change those defaults to nonobvious
alternatives.
But it is not just account and password defaults you need to be concerned with, there are also the installation
defaults such as path names, folder names, components, services, configurations, and settings. Each and every
possible customizable option should be considered for customization. Try to avoid installing operating systems
into the default drives and folders set by the vendor. Don't install applications and other software into their
"standard" locations. Don't accept the folder names offered by the installation scripts or wizards. The more
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 3
you can customize your installations, configurations, and settings, the more your system will be incompatible
with attack tools and exploitation scripts.
4. Man-in-the-Middle Attacks
Every single person reading this white paper has been a target of numerous man-in-the-middle attacks. A
MITM attack occurs when an attacker is able to fool a user into establishing a communication link with a server
or service through a rogue entity. The rogue entity is the system controlled by the hacker. It has been set up
to intercept the communication between user and server without letting the user become aware that the misdirection
attack has taken place. A MITM attack works by somehow fooling the user, their computer, or some
part of the user's network into re-directing legitimate traffic to the illegitimate rogue system.
A MITM attack can be as simple as a phishing e-mail attack where a legitimate looking e-mail is sent to a user
with a URL link pointed towards the rogue system instead of the real site. The rogue system has a look-alike
interface that tricks the user into providing their logon credentials. The logon credentials are then duplicated
and sent on to the real server. This action opens a link with the real server, allowing the user to interact with
their resources without the knowledge that their communications have taken a detour through a malicious
system that is eavesdropping on and possibly altering the traffic.
MITM attacks can also be waged using more complicated methods, including MAC (Media Access Control)
duplication, ARP (Address Resolution Protocol) poisoning, router table poisoning, fake routing tables, DNS
(Domain Name Server) query poisoning, DNS hijacking, rogue DNS servers, HOSTS file alteration, local DNS
cache poisoning, and proxy re-routing. And that doesn't mention URL obfuscation, encoding, or manipulation
that is often used to hide the link misdirection.
To protect yourself against MITM attacks, you need to avoid clicking on links found in e-mails. Furthermore,
always verify that links from Web sites stay within trusted domains or still maintain SSL encryption. Also,
deploy IDS (Intrusion Detection System) systems to monitor network traffic as well as DNS and local system
alterations.
5.Wireless Attacks
Wireless networks have the appeal of freedom from wires - the ability to be mobile within your office while
maintaining network connectivity. Wireless networks are inexpensive to deploy and easy to install.
Unfortunately, the true cost of wireless networking is not apparent until security is considered. It is often the
case that the time, effort, and expense required to secure wireless networks is significantly more than deploying
a traditional wired network.
Interference, DOS, hijacking, man-in-the-middle, eavesdropping, sniffing, and many more attacks are made simple
for attackers when wireless networks are present. That doesn't even mention the issue that a secured
wireless network (802.11a or 802.11g) will typically support under 14 Mbps of throughput, and then only
under the most ideal transmission distances and conditions. Compare that with the standard of a minimum of
100 Mbps for a wired network, and the economy just doesn't make sense.
However, even if your organization does not officially sanction and deploy a wireless network, you may still
have wireless network vulnerabilities. Many organizations have discovered that workers have taken it upon
themselves to secretly deploy their own wireless network. They can do this by bringing in their own wireless
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 4
access point (WAP), plugging in their desktop's network cable into the WAP, then re-connecting their desktop
to one of the router/switch ports of the WAP. This retains their desktop's connection to the network, plus it
adds wireless connectivity. All too often when an unapproved WAP is deployed, it is done with little or no
security enabled on the WAP. Thus, a $50 WAP can easily open up a giant security hole in a multi-million dollar
secured-wired network.
To combat unapproved wireless access points, a regular site survey needs to be performed. This can be done
with a notebook using a wireless detector such as NetStumbler or with a dedicated hand-held device.
6. Doing their Homework
I don't mean that hackers break into your network by getting their school work done, but you might be surprised
how much they learn from school about how to compromise security. Hackers, especially external
hackers, learn how to overcome your security barriers by researching your organization. This process can be
called reconnaissance, discovery, or footprinting. Ultimately, it is intensive, focused research into all information
available about your organization from public and non-so-public resources.
If you've done any research or reading into warfare tactics, you are aware that the most important weapon
you can have at your disposal is information. Hackers know this and spend considerable time and effort
acquiring a complete arsenal. What is often disconcerting is how much your organization freely contributes to
the hacker's weapon stockpile. Most organizations are hemorrhaging data; companies freely give away too
much information that can be used against them in various types of logical and physical attacks. Here are just
a few common examples of what a hacker can learn about your organization, often in minutes:
• The names of your top executives and any flashy employees you have by perusing your archive of press
releases.
• The company address, phone number, and fax number from domain name registration.
• The service provider for Internet access through DNS lookup and traceroute.
• Employee home addresses, phone numbers, employment history, family members, previous addresses,
criminal record, driving history, and more by looking up their names in various free and paid background
research sites.
• The operating systems, major programs, programming languages, specialized platforms, network device
vendors, and more from job site postings.
• Physical weaknesses, vantage points, lines of sight, entry ways, covert access paths, and more from
satellite images of your company and employee addresses.
• Usernames, e-mail addresses, phone numbers, directory structure, filenames, OS type,Web server platform,
scripting languages,Web application environments, and more from Web site scanners.
• Confidential documents accidentally posted to a Web site from archive.org and Google hacking.
• Flaws in your products, problems with staff, internal issues, company politics, and more from blogs,
product reviews, company critiques, and competitive intelligence services.
As you can see, there is no end to the information that a hacker can obtain from public open sources. This list
of examples is only a beginning. Each kernel of truth discovered often leads the hacker to unearth more. Often,
a hacker will spend over 90% of their time in information-gathering activities. The more the attacker learns
about the target, the easier the subsequent attack becomes.
As for defense, you are ultimately at a loss—mainly because it is already too late. Once information is out on
the Internet, it is always out there. You can obviously clean up and sterilize any information resource currently
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 5
under your direct control. You can even contact third-party information repositories to request that they
change your information. Some online data systems, such as domain registrars, offer privacy and security services
(for a fee, of course). You can also control or limit the output of information in the future by being more
discrete in your announcements, product details, press releases, etc.
However, it is the information that you can't change or remove from the Internet that will continue to erode
your security. The only way to manage uncontrollable information is to alter your environment so that it is no
longer correct or relevant. Think of this as a new way to deviate from defaults or at least deviate from the previous
known.
7. Monitoring Vulnerability Research
Hackers have access to the same vulnerability research that you do. They are able to read Web sites, discussion
lists, blogs, and other public information services about known problems, issues, and vulnerabilities with hardware
and software. The more the hacker can discover about possible attack points, the more likely it is that he
can discover a weakness you've yet to patch, protect, or even become aware of.
To combat vulnerability research on the part of the hacker, you have to be just as vigilant as the hacker. You
have to be looking for the problems in order to protect against them just as intently as the hacker is looking
for problems to exploit. This means keeping watch on discussion groups and web sites from each and every
vendor whose products your organization utilizes. Plus, you need to watch the third-party security oversight
discussion groups and web sites to learn about issues that vendors are failing to make public or that don't yet
have easy solutions. These include places like securityfocus.com, US CERT, hackerstorm.com, and
hackerwatch.org.
8. Being Patient and Persistent
Hacking into a company network is not typically an activity someone undertakes and completes in a short period
of time. Hackers often research their targets for weeks or months, before starting their first tentative logical
interactions against their target with scanners, banner-grabbing tools, and crawling utilities. And even then,
their initial activities are mostly subtle probing to verify the data they gathered through their intensive
"offline" research. Once hackers have crafted a profile of your organization, they must then select a specific
attack point, design the attack, test and drill the attack, improve the attack, schedule the attack, and, finally,
launch the attack.
In most cases, a hacker's goal is not to bang on your network so that you become aware of their attacks.
Instead, a hacker's goal is to gain entry subtly so that you are unaware that a breach has actually taken place.
The most devastating attacks are those that go undetected for extended periods of time, while the hacker has
extensive control over the environment. An invasion can remain undetected nearly indefinitely if it is executed
by a hacker who is patient and persistent. Hacking is often most successful when performed one small step at
a time and with significant periods of time between each step attempt - at least up to the point of a successful
breach. Once hackers have gained entry, they quickly deposit tools to hide their presence and grant them
greater degrees of control over your environment. Once these hacker tools are planted, hidden, and made
active, the hackers are free to come and go as they please.
Likewise, protecting against a hacker intrusion is also about patients and persistence. You must be able to
watch even the most minor activities on your network with standard auditing processes as well as an auto-
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 6
mated IDS/IPS system. Never allow any anomaly to go uninvestigated. Use common sense, follow the best
business practices recommended by security professionals, and keep current on patches, updates, and system
improvements.
However, realize that security is not a goal that can be fully obtained. There is no perfectly secure environment.
Every security mechanism can be fooled, overcome, disabled, bypassed, exploited, or made worthless. Hacking
successfully often means the hacker is more persistent than the security professional protecting an environment.
Ultimately, it is an arms race to see who blinks or falls behind first. With enough time, the right tools,
sufficient expertise and skill, mounting information collection, and persistence, a hacker can and will find a
way to breach any and every security system.
9. Confidence Games
The good news about hacking today is that many security mechanisms are very effective against most hacking
attempts. Firewalls, IDSes, IPSes, and anti-malware scanners have made intrusions and hacking a difficult task.
However, the bad news is many hackers have expanded their idea of what hacking means to include social
engineering: hackers are going after the weakest link in any organization's security—the people.
People are always the biggest problem with security because they are the only element within the secured
environment that has the ability to choose to violate the rules. People can be coerced, tricked, duped, or forced
into violating some aspect of the security system in order to grant a hacker access. The age-old problem of
people exploiting other people by taking advantage of human nature has returned as a means to bypass modern
security technology.
Protection against social engineering is primarily education. Training personnel about what to look for and to
report all abnormal or awkward interactions can be effective countermeasures. But this is only true if everyone
in the organization realizes that they are a social engineering target. In fact, the more a person believes that
their position in the company is so minor that they would not be a worthwhile target, the more they are actually
the preferred targets of the hacker.
10. Already Being on the Inside
All too often when hacking is discussed, it is assumed that the hacker is some unknown outsider. However,
studies have shown that a majority of security violations actually are caused by internal employees. So, one of
the most effective ways for a hacker to breach security is to be an employee. This can be read in two different
ways. First, the hacker can get a job at the target company and then exploit that access once they gain the
trust of the organization. Second, an existing employee can become disgruntled and choose to cause harm to
the company as a form of revenge or retribution.
In either case, when someone on the inside decides to attack the company network, many of the security
defenses erected against outside hacking and intrusion are often ineffective. Instead, internal defenses specific
to managing internal threats need to be deployed. This could include keystroke monitoring, tighter enforcement
of the principle of least privilege, preventing users from installing software, not allowing any external
removable media source, disabling all USB ports, extensive auditing, host-based IDS/IPS, and Internet filtering
and monitoring.
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 7
Conclusion
There are many possible ways that a hacker can gain access to a seemingly secured environment. It is the
responsibility of everyone within an organization to support security efforts and to watch for abnormal events.
We need to secure IT environments to the best of our abilities and budgets while watching for the inevitable
breach attempt. In this continuing arms race, vigilance is required, persistence is necessary, and knowledge is
invaluable.
Learn More
Learn more about how you can improve productivity, enhance efficiency, and sharpen your competitive edge.
Check out the following Global Knowledge courses:
Essentials of Network Security
Certified Ethical Hacker (CEH)
Foundstone Essentials of Hacking
Foundstone Ultimate Hacking
Foundstone Ultimate Hacking: Expert
For more information or to register, visit www.globalknowledge.com or call 1-800-COURSES to speak with a
sales representative.
Our courses and enhanced, hands-on labs offer practical skills and tips that you can immediately put to use.
Our expert instructors draw upon their experiences to help you understand key concepts and how to apply
them to your specific work situation. Choose from our more than 700 courses, delivered through Classrooms,
e-Learning, and On-site sessions, to meet your IT and management training needs.
About the Author
James Michael Stewart has been working with computers and technology for more than 20 years. As a Global
Knowledge Instructor he has been teaching CEH and CHFI courses. He has also focused on Windows
2003/XP/2000, certification, and security in the classroom. In addition, Michael has authored numerous books
on security, certification, and administration topics. He is a regular instructor at Interop. Michael holds the following
certifications: CISSP, ISSAP, SSCP, MCT, CEI, CEH, CHFI, TICSA, CIW SA, Security+, MCSE+Security
Windows 2000, MCSA Windows Sever 2003, MCDST, MCSE NT & W2K, MCP+I, Network+, iNet+.
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 8
Introduction
Hacking, cracking, and cyber crimes are hot topics these days and will continue to be for the foreseeable future.
However, there are steps you can take to reduce your organization's threat level. The first step is to understand
what risks, threats, and vulnerabilities currently exist in your environment. The second step is to learn as much
as possible about the problems so you can formulate a solid response. The third step is to intelligently deploy
your selected countermeasures and safeguards to erect protections around your most mission-critical assets. This
white paper discusses ten common methods hackers use to breach your existing security.
1. Stealing Passwords
Security experts have been discussing the problems with password security for years. But it seems that few
have listened and taken action to resolve those problems. If your IT environment controls authentication using
passwords only, it is at greater risk for intrusion and hacking attacks than those that use some form of multifactor
authentication.
The problem lies with the ever-increasing abilities of computers to process larger amounts of data in a smaller
amount of time. A password is just a string of characters, typically only keyboard characters, which a person
must remember and type into a computer terminal when required. Unfortunately, passwords that are too complex
for a person to remember easily can be discovered by a cracking tool in a frighteningly short period of
time. Dictionary attacks, brute force attacks, and hybrid attacks are all various methods used to guess or crack
passwords. The only real protection against such threats is to make very long passwords or use multiple factors
for authentication. Unfortunately, requiring ever longer passwords causes a reversing of security due to the
human factor. People simply are not equipped to remember numerous long strings of chaotic characters.
But even with reasonably long passwords that people can remember, such as 12 to 16 characters, there are
still other problems facing password-only authentication systems. These include:
• People who use the same password on multiple accounts, especially when some of those accounts are
on public Internet sites with little to no security.
• People who write their passwords down and store them in obvious places. Writing down passwords is
often encouraged by the need to frequently change passwords.
• The continued use of insecure protocols that transfer passwords in clear text, such as those used for
Web surfing, e-mail, chat, file transfer, etc.
• The threat of software and hardware keystroke loggers.
• The problem of shoulder surfing or video surveillance.
James Michael Steward, Global Knowledge Instructor
Ten Ways Hackers Breach Security
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 2
Password theft, password cracking, and even password guessing are still serious threats to IT environments.
The best protection against these threats is to deploy multifactor authentication systems and to train personnel
regarding safe password habits.
2.Trojan Horses
A Trojan horse is a continuing threat to all forms of IT communication. Basically, a Trojan horse is a malicious
payload surreptitiously delivered inside a benign host. You are sure to have heard of some of the famous
Trojan horse malicious payloads such as Back Orifice, NetBus, and SubSeven. But the real threat of Trojan horses
is not the malicious payloads you know about, its ones you don't. A Trojan horse can be built or crafted by
anyone with basic computer skills. Any malicious payload can be combined with any benign software to create
a Trojan horse. There are countless ways of crafting and authoring tools designed to do just that. Thus, the real
threat of Trojan horse attack is the unknown.
The malicious payload of a Trojan horse can be anything. This includes programs that destroy hard drives, corrupt
files, record keystrokes, monitor network traffic, track Web usage, duplicate e-mails, allow remote control
and remote access, transmit data files to others, launch attacks against other targets, plant proxy servers, host
file sharing services, and more. Payloads can be grabbed off the Internet or can be just written code authored
by the hacker. Then, this payload can be embedded into any benign software to create the Trojan horse.
Common hosts include games, screensavers, greeting card systems, admin utilities, archive formats, and even
documents.
All a Trojan horse attack needs to be successful is a single user to execute the host program. Once that is
accomplished, the malicious payload is automatically launched as well, usually without any symptoms of
unwanted activity. A Trojan horse could be delivered via e-mail as an attachment, it could be presented on a
Web site as a download, or it could be placed on a removable media (memory card, CD/DVD, USB stick, floppy,
etc.). In any case, your protections are automated malicious code detection tools, such as modern anti-virus
protections and other specific forms of malware scanners, and user education.
3. Exploiting Defaults
Nothing makes attacking a target network easier than when that target is using the defaults set by the vendor
or manufacturer. Many attack tools and exploit scripts assume that the target is configured using the default
settings. Thus, one of the most effective and often overlooked security precautions is simply to change the
defaults.
To see the scope of this problem, all you need to do is search the Internet for sites using the keywords "default
passwords". There are numerous sites that catalog all of the default user names, passwords, access codes, settings,
and naming conventions of every software and hardware IT product ever sold. It is your responsibility to
know about the defaults of the products you deploy and make every effort to change those defaults to nonobvious
alternatives.
But it is not just account and password defaults you need to be concerned with, there are also the installation
defaults such as path names, folder names, components, services, configurations, and settings. Each and every
possible customizable option should be considered for customization. Try to avoid installing operating systems
into the default drives and folders set by the vendor. Don't install applications and other software into their
"standard" locations. Don't accept the folder names offered by the installation scripts or wizards. The more
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 3
you can customize your installations, configurations, and settings, the more your system will be incompatible
with attack tools and exploitation scripts.
4. Man-in-the-Middle Attacks
Every single person reading this white paper has been a target of numerous man-in-the-middle attacks. A
MITM attack occurs when an attacker is able to fool a user into establishing a communication link with a server
or service through a rogue entity. The rogue entity is the system controlled by the hacker. It has been set up
to intercept the communication between user and server without letting the user become aware that the misdirection
attack has taken place. A MITM attack works by somehow fooling the user, their computer, or some
part of the user's network into re-directing legitimate traffic to the illegitimate rogue system.
A MITM attack can be as simple as a phishing e-mail attack where a legitimate looking e-mail is sent to a user
with a URL link pointed towards the rogue system instead of the real site. The rogue system has a look-alike
interface that tricks the user into providing their logon credentials. The logon credentials are then duplicated
and sent on to the real server. This action opens a link with the real server, allowing the user to interact with
their resources without the knowledge that their communications have taken a detour through a malicious
system that is eavesdropping on and possibly altering the traffic.
MITM attacks can also be waged using more complicated methods, including MAC (Media Access Control)
duplication, ARP (Address Resolution Protocol) poisoning, router table poisoning, fake routing tables, DNS
(Domain Name Server) query poisoning, DNS hijacking, rogue DNS servers, HOSTS file alteration, local DNS
cache poisoning, and proxy re-routing. And that doesn't mention URL obfuscation, encoding, or manipulation
that is often used to hide the link misdirection.
To protect yourself against MITM attacks, you need to avoid clicking on links found in e-mails. Furthermore,
always verify that links from Web sites stay within trusted domains or still maintain SSL encryption. Also,
deploy IDS (Intrusion Detection System) systems to monitor network traffic as well as DNS and local system
alterations.
5.Wireless Attacks
Wireless networks have the appeal of freedom from wires - the ability to be mobile within your office while
maintaining network connectivity. Wireless networks are inexpensive to deploy and easy to install.
Unfortunately, the true cost of wireless networking is not apparent until security is considered. It is often the
case that the time, effort, and expense required to secure wireless networks is significantly more than deploying
a traditional wired network.
Interference, DOS, hijacking, man-in-the-middle, eavesdropping, sniffing, and many more attacks are made simple
for attackers when wireless networks are present. That doesn't even mention the issue that a secured
wireless network (802.11a or 802.11g) will typically support under 14 Mbps of throughput, and then only
under the most ideal transmission distances and conditions. Compare that with the standard of a minimum of
100 Mbps for a wired network, and the economy just doesn't make sense.
However, even if your organization does not officially sanction and deploy a wireless network, you may still
have wireless network vulnerabilities. Many organizations have discovered that workers have taken it upon
themselves to secretly deploy their own wireless network. They can do this by bringing in their own wireless
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 4
access point (WAP), plugging in their desktop's network cable into the WAP, then re-connecting their desktop
to one of the router/switch ports of the WAP. This retains their desktop's connection to the network, plus it
adds wireless connectivity. All too often when an unapproved WAP is deployed, it is done with little or no
security enabled on the WAP. Thus, a $50 WAP can easily open up a giant security hole in a multi-million dollar
secured-wired network.
To combat unapproved wireless access points, a regular site survey needs to be performed. This can be done
with a notebook using a wireless detector such as NetStumbler or with a dedicated hand-held device.
6. Doing their Homework
I don't mean that hackers break into your network by getting their school work done, but you might be surprised
how much they learn from school about how to compromise security. Hackers, especially external
hackers, learn how to overcome your security barriers by researching your organization. This process can be
called reconnaissance, discovery, or footprinting. Ultimately, it is intensive, focused research into all information
available about your organization from public and non-so-public resources.
If you've done any research or reading into warfare tactics, you are aware that the most important weapon
you can have at your disposal is information. Hackers know this and spend considerable time and effort
acquiring a complete arsenal. What is often disconcerting is how much your organization freely contributes to
the hacker's weapon stockpile. Most organizations are hemorrhaging data; companies freely give away too
much information that can be used against them in various types of logical and physical attacks. Here are just
a few common examples of what a hacker can learn about your organization, often in minutes:
• The names of your top executives and any flashy employees you have by perusing your archive of press
releases.
• The company address, phone number, and fax number from domain name registration.
• The service provider for Internet access through DNS lookup and traceroute.
• Employee home addresses, phone numbers, employment history, family members, previous addresses,
criminal record, driving history, and more by looking up their names in various free and paid background
research sites.
• The operating systems, major programs, programming languages, specialized platforms, network device
vendors, and more from job site postings.
• Physical weaknesses, vantage points, lines of sight, entry ways, covert access paths, and more from
satellite images of your company and employee addresses.
• Usernames, e-mail addresses, phone numbers, directory structure, filenames, OS type,Web server platform,
scripting languages,Web application environments, and more from Web site scanners.
• Confidential documents accidentally posted to a Web site from archive.org and Google hacking.
• Flaws in your products, problems with staff, internal issues, company politics, and more from blogs,
product reviews, company critiques, and competitive intelligence services.
As you can see, there is no end to the information that a hacker can obtain from public open sources. This list
of examples is only a beginning. Each kernel of truth discovered often leads the hacker to unearth more. Often,
a hacker will spend over 90% of their time in information-gathering activities. The more the attacker learns
about the target, the easier the subsequent attack becomes.
As for defense, you are ultimately at a loss—mainly because it is already too late. Once information is out on
the Internet, it is always out there. You can obviously clean up and sterilize any information resource currently
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 5
under your direct control. You can even contact third-party information repositories to request that they
change your information. Some online data systems, such as domain registrars, offer privacy and security services
(for a fee, of course). You can also control or limit the output of information in the future by being more
discrete in your announcements, product details, press releases, etc.
However, it is the information that you can't change or remove from the Internet that will continue to erode
your security. The only way to manage uncontrollable information is to alter your environment so that it is no
longer correct or relevant. Think of this as a new way to deviate from defaults or at least deviate from the previous
known.
7. Monitoring Vulnerability Research
Hackers have access to the same vulnerability research that you do. They are able to read Web sites, discussion
lists, blogs, and other public information services about known problems, issues, and vulnerabilities with hardware
and software. The more the hacker can discover about possible attack points, the more likely it is that he
can discover a weakness you've yet to patch, protect, or even become aware of.
To combat vulnerability research on the part of the hacker, you have to be just as vigilant as the hacker. You
have to be looking for the problems in order to protect against them just as intently as the hacker is looking
for problems to exploit. This means keeping watch on discussion groups and web sites from each and every
vendor whose products your organization utilizes. Plus, you need to watch the third-party security oversight
discussion groups and web sites to learn about issues that vendors are failing to make public or that don't yet
have easy solutions. These include places like securityfocus.com, US CERT, hackerstorm.com, and
hackerwatch.org.
8. Being Patient and Persistent
Hacking into a company network is not typically an activity someone undertakes and completes in a short period
of time. Hackers often research their targets for weeks or months, before starting their first tentative logical
interactions against their target with scanners, banner-grabbing tools, and crawling utilities. And even then,
their initial activities are mostly subtle probing to verify the data they gathered through their intensive
"offline" research. Once hackers have crafted a profile of your organization, they must then select a specific
attack point, design the attack, test and drill the attack, improve the attack, schedule the attack, and, finally,
launch the attack.
In most cases, a hacker's goal is not to bang on your network so that you become aware of their attacks.
Instead, a hacker's goal is to gain entry subtly so that you are unaware that a breach has actually taken place.
The most devastating attacks are those that go undetected for extended periods of time, while the hacker has
extensive control over the environment. An invasion can remain undetected nearly indefinitely if it is executed
by a hacker who is patient and persistent. Hacking is often most successful when performed one small step at
a time and with significant periods of time between each step attempt - at least up to the point of a successful
breach. Once hackers have gained entry, they quickly deposit tools to hide their presence and grant them
greater degrees of control over your environment. Once these hacker tools are planted, hidden, and made
active, the hackers are free to come and go as they please.
Likewise, protecting against a hacker intrusion is also about patients and persistence. You must be able to
watch even the most minor activities on your network with standard auditing processes as well as an auto-
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 6
mated IDS/IPS system. Never allow any anomaly to go uninvestigated. Use common sense, follow the best
business practices recommended by security professionals, and keep current on patches, updates, and system
improvements.
However, realize that security is not a goal that can be fully obtained. There is no perfectly secure environment.
Every security mechanism can be fooled, overcome, disabled, bypassed, exploited, or made worthless. Hacking
successfully often means the hacker is more persistent than the security professional protecting an environment.
Ultimately, it is an arms race to see who blinks or falls behind first. With enough time, the right tools,
sufficient expertise and skill, mounting information collection, and persistence, a hacker can and will find a
way to breach any and every security system.
9. Confidence Games
The good news about hacking today is that many security mechanisms are very effective against most hacking
attempts. Firewalls, IDSes, IPSes, and anti-malware scanners have made intrusions and hacking a difficult task.
However, the bad news is many hackers have expanded their idea of what hacking means to include social
engineering: hackers are going after the weakest link in any organization's security—the people.
People are always the biggest problem with security because they are the only element within the secured
environment that has the ability to choose to violate the rules. People can be coerced, tricked, duped, or forced
into violating some aspect of the security system in order to grant a hacker access. The age-old problem of
people exploiting other people by taking advantage of human nature has returned as a means to bypass modern
security technology.
Protection against social engineering is primarily education. Training personnel about what to look for and to
report all abnormal or awkward interactions can be effective countermeasures. But this is only true if everyone
in the organization realizes that they are a social engineering target. In fact, the more a person believes that
their position in the company is so minor that they would not be a worthwhile target, the more they are actually
the preferred targets of the hacker.
10. Already Being on the Inside
All too often when hacking is discussed, it is assumed that the hacker is some unknown outsider. However,
studies have shown that a majority of security violations actually are caused by internal employees. So, one of
the most effective ways for a hacker to breach security is to be an employee. This can be read in two different
ways. First, the hacker can get a job at the target company and then exploit that access once they gain the
trust of the organization. Second, an existing employee can become disgruntled and choose to cause harm to
the company as a form of revenge or retribution.
In either case, when someone on the inside decides to attack the company network, many of the security
defenses erected against outside hacking and intrusion are often ineffective. Instead, internal defenses specific
to managing internal threats need to be deployed. This could include keystroke monitoring, tighter enforcement
of the principle of least privilege, preventing users from installing software, not allowing any external
removable media source, disabling all USB ports, extensive auditing, host-based IDS/IPS, and Internet filtering
and monitoring.
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 7
Conclusion
There are many possible ways that a hacker can gain access to a seemingly secured environment. It is the
responsibility of everyone within an organization to support security efforts and to watch for abnormal events.
We need to secure IT environments to the best of our abilities and budgets while watching for the inevitable
breach attempt. In this continuing arms race, vigilance is required, persistence is necessary, and knowledge is
invaluable.
Learn More
Learn more about how you can improve productivity, enhance efficiency, and sharpen your competitive edge.
Check out the following Global Knowledge courses:
Essentials of Network Security
Certified Ethical Hacker (CEH)
Foundstone Essentials of Hacking
Foundstone Ultimate Hacking
Foundstone Ultimate Hacking: Expert
For more information or to register, visit www.globalknowledge.com or call 1-800-COURSES to speak with a
sales representative.
Our courses and enhanced, hands-on labs offer practical skills and tips that you can immediately put to use.
Our expert instructors draw upon their experiences to help you understand key concepts and how to apply
them to your specific work situation. Choose from our more than 700 courses, delivered through Classrooms,
e-Learning, and On-site sessions, to meet your IT and management training needs.
About the Author
James Michael Stewart has been working with computers and technology for more than 20 years. As a Global
Knowledge Instructor he has been teaching CEH and CHFI courses. He has also focused on Windows
2003/XP/2000, certification, and security in the classroom. In addition, Michael has authored numerous books
on security, certification, and administration topics. He is a regular instructor at Interop. Michael holds the following
certifications: CISSP, ISSAP, SSCP, MCT, CEI, CEH, CHFI, TICSA, CIW SA, Security+, MCSE+Security
Windows 2000, MCSA Windows Sever 2003, MCDST, MCSE NT & W2K, MCP+I, Network+, iNet+.
Copyright ©2007 Global Knowledge Training LLC. All rights reserved. Page 8
Subscribe to:
Posts (Atom)