Monday, April 23, 2007

UUCP

UUCP - Unix to Unix Copy Program is a protocol used to transfer files between computers primarily over ASCII dial-up connections. It was widely used to implement e-mail and Usenet News prior to the widespread deployment of the Internet.

UUCP is primarily used with ASCII dial-up lines. Taylor UUCP can also transfer files over a TCP/IP connection across the Internet. In most cases, if you are transferring over the Internet, you would want to use modern protocols, SMTP for e-mail (in conjunction with ETRN for servers that are intermittently connected), FTP for file transfer, ssh for remote program execution, but there are legacy applications wired into UUCP.


There are many UUCP implementations. Taylor UUCP, which introduced a sliding window transfer protocol, offers the best throughput. Taylor UUCP also addressed security issues present in previous UUCP implementations. Eskimo North uses Taylor UUCP but at present we have it enabled for dial-up usage only. If someone has a pressing need for UUCP over IP we will consider enabling IP support.

Sunday, April 22, 2007

ETRN Polling

Mail hosts which have intermittent connectivity to the Internet will need a connected host to store mail for them when they are not connected and then transmit it to them when they are.

The SMTP protocol has the necessary facilities to accomplish this. First, SMTP uses DNS MX records to determine what mail exchange server(s) to connect to in order to send mail to a particular domain.

These MX records have priority values associated with them. The lower the numerical value of the MX priority. If a sending site looks up a domain name and finds that there are two MX servers, one has a value of 10, the other 100, it will first attempt to connect to the server with the value of 10. If it can not, it will next try the server with the MX priority value of 100.

Eskimo North uses this to implement ETRN polling. A DNS record for your domain with an MX record for your server is added with a MX priority value that is low, like '10', and an MX record for a server at the ISP is added with a high MX priority value, say '100'.

Eskimo North also must configure it's MTA to relay for your domain so that it can accept mail for your domain.

Now what happens is a remote site attempts to send mail, it will first attempt to send directly to your server because it has the lower value priority MX record. If your server is available, it will send the mail to your server. If your server is not available, it will then try the higher priority value MX record for the server at Eskimo North, and our server will accept the mail. It will attempt to forward it but it will be unable to do so because your site is off line so it will queue the incoming mail.

Now when your site connects to the net, it will connect to the mail server at Eskimo North and it will issue an ETRN command that asks the remote server to initiate a connection and session towards your server.

In the early days a command called TURN was used to reverse the session direction. However, this had a security hole in that a site could connect, issue an EHLO command informing the MTA that it was a different site, then issue an ETRN command and steal that sites mail. This was not a good thing.

The ETRN command works differently. Since it initiates the connection, it can be more confident that it's talking to the right system, as opposed to trusting an existing connection.

On this end then it basically requires DNS and sendmail (the MTA we use) configuration. On your end, it requires software capable of issuing an ETRN command.

In order for this to work, a static IP address is not required on your end, but a static host name is. This can be accomplished on a dynamic IP address by using dynamic DNS that dynamically maps a static host name to your dynamic IP. There are a number of dynamic DNS services that do this, many are free.

Saturday, April 21, 2007

UID - USER ID

Each Unix-Like operating system user has a integer identification number associated with their login. This is known as the UID or User ID.

Software can manipulate integers extremely rapidly. Strings of characters take longer to evaluate and compare. Integers require less memory and disk space to store than character strings.

For these reasons, Unix-like operating systems map your login to an integer and use the integer for all internal functions relating to users. Things like file ownerships are stored as an integer value. A file, /etc/passwd, is used to map user logins to integer values and vice versa. Sometimes these values are databased for faster lookup.

If you remember the old Johnny Rivers song, Secret Agent Man (1966), and specifically the lyrics, "given you a number, and takin' way your name...", well that's what Unix does internally. Externally, you get to keep your name and most programs that provide user information will convert the numbers back to a login for display.

Home Directory

A home directory is a directory in a file system that is associated with your user account. It is "owned" by you and you can control, through a permissions system, who has access to it and what kind of access they have.

Your home directory will be used to store user specific configuration files for various applications, data for those applications, and any other files which you may choose to store there.

You may create subdirectories to organize your files. Certain directory names have special meaning to applications. For example, a directory called 'mail' is used by most mail applications to store mail folders.

Files and directories starting with '.' are "hidden", and do not normally show up in the output of the 'ls' command (which lists contents of a directory analogous to 'dir' in Windows). The 'ls' command can be given a '-a' flag to tell it to show the hidden directories as well.

Directories exist in a tree hierarchy. Unix and Unix-like operating systems have just one tree with a common root, Windows usually has separate trees for each disk device, however, newer incarnations of Windows support mounting a device in a manner similar to Unix-like operating systems.

There are two special hidden directories, '.' refers to the current directory, and '..' refers to the parent directory.

In Unix-like operating systems, the path separator character is '/' rather than '\' used in Windows. In Unix-like operating systems, the '\' character has a different use, it is used to escape characters that have special meanings and cause them to be treated like an ordinary character.

A typical path to a users home directory in a Unix-like operating system might look something like this:
/users/geek
However, some systems might break it down further in order to limit the number of subdirectories in one directory and thus have a more complex path such as:
/u/g/geek
Unix-like operating systems will place the path to your home directory in an environmental variable called $HOME when you login, thus you can refer to your home directory as $HOME regardless of the actual path.

The subdirectories you create need not all have the same permissions. It is thus possible to create a directory with public read access with files that you wish to make publicly available and a directory without public read access for files which you prefer to keep private.

In addition to user specific applications configuration information and applications data, your home directory may contain arbitrary files you choose to keep there, collections of photographs, audio files, or video files for example. Many users might wish to create or compile their own application programs and so you may wish to create a subdirectory for executable programs.

As with the disk space on your home computer, what you choose to store in your home directory is limited by your imagination. Unlike your home computer, you can access this information from anywhere on the Internet.

What Is A Shell Account?

Shell

A command line interpreter and a graphical user interface are built into Microsoft Windows and many other operating systems. Unix, Linux, and other Unix-like operating systems do not incorporate the command line interface or the GUI into the operating system. Instead a separate program provides the command line interface.This program is called a shell. A GUI is also provided by a set of programs collectively known as X-Windows.

This separation makes it possible for different users to use different interfaces of their own preference. People who first learned on BSD might prefer to use csh, the shell developed at Berkeley, or tcsh, a superset of the csh command set. People who first learned on AT&T System V Unix systems might prefer the Bourne shell, sh, or the Korn shell, ksh which is a superset of the Bourne shell. People who first learned on Linux, may prefer Bash, the shell used by most Linux distributions. Bash is also a superset of sh, but with a different set of extensions than Ksh.

X-windows

Most modern Unix, Linux, and Unix-like operating systems also include an X-windows based graphical user interface. X-windows is a client-server application that has the advantage of allowing a program running on a remote computer, such as Eskimo North's shell server, to display and accept keyboard input from a different computer, such as your X-windows equipped home computer. Thus, you can sit on your computer at home and run graphical programs that are hosted on another computer half-way around the world transparently. It is even possible to have a windows manager providing a desktop run on a remote computer and display on your home computer. These applications behave no differently than as if they were executing on your own computer.

See: Executing X-Windows Applications On A Remote Host.

Shell Accounts

A shell account provides access to a Unix-like host server computer that is connected to the internet and remains on-line and available for use at anytime from anywhere on the Internet. Eskimo North shell accounts are integrated with e-mail, Usenet News, web hosting, and ftp hosting.

Most shell accounts only allow text access. Eskimo North does allows X-windows graphical access as well as text based shell access. Eskimo North allows remote login to a shell account via rlogin, telnet, or ssh. Of these, ssh is the preferred method in that it encrypts the connection preventing any data from being sniffed between your home computer and Eskimo North's shell server.

A shell account provides a unique user ID. The user ID has a one to eight character login name and a integer UID associated with that login. A shell account includes a home directory which is owned by your user ID. This is used by applications to store user specific configuration information and user specific applications data such as mail folders. In addition you can use it to store personal files, pictures, sound files, video files, applications programs which you will run on the shell server, source code that you compile into an executable application program, shell scripts (files with shell commands), almost anything. You can access files in your directory from anywhere on the Internet.

Shells provide more than a simple command line interpreter. They provide conditional loops, math capabilities, input / output redirection, error handling, variables (some include arrays), importable and exportable environments, automatic execution of initialization commands, pattern matching, command line history, command line completion, and many other program language features. It is possible to write fully functional programs in shell scripts alone and some do exist.

Scheduled Execution

There different methods, at, batch, and cron, are provided for the automatic scheduled execution of programs or shell scripts (files which contain a list of shell commands). The at command allows you to schedule the one-time execution of a program or script at some specified time in the future. The batch command allows you to schedule the execution of a program or shell script as soon as the system load is low enough. The cron command allows you to schedule a program or script periodically.

An example, perhaps you were planning on doing maintenance on a server at 9 PM, you might use 'at' to schedule an automatic shutdown of the server at 8:45. If you were going to rebuild a large software package such as X-windows, you could use batch to schedule the build to start when the system was sufficiently idle. This also would allow the package to be built without being attached to a terminal. It could be done while you are logged off. An example of how you might use cron could be to make scheduled changes to your website, or perhaps automatically forward your e-mail at a particular time and then unforward it later.

Operating System Environments

There are numerous Unix and Unix-like operating systems in use today. Linux, BSD, and System-V derived systems like Solaris are popular. Where the commands differ between these different versions, we have versions of those commands for each flavor in separate directories. If you prefer a BSD environment, put /usr/ucb first in your PATH. If you prefer system V, put /usr/5bin first in your PATH. If you prefer GNU/Linux, put /usr/local/gnu/bin first in your PATH. You probably want to put your own bin directory first so that programs which you compile will take precedence over system programs.

Programming Languages

There are two C compilers present, the C compiler provided with SunOS is 'cc', and the GNU C compiler is 'gcc'. The GNU compiler 'gcc' is the one to use for basically everything unless you have some very archaic C code. The GNU compiler will also compile C+ code. The GNU Fortran compiler (f77) is available.

Perl, Python, and many scripting tools are available. PHP is available on the web server but not presently the shell server.

Website Integration

Every shell account includes web hosting under our domain. There are two special directories you can create and place files in to make them available on web. You can place files in a directory called 'public_html' and they will be visible at http://www.eskimo.com/~username. Where username is the login you chose when you applied for a shell account. Files placed in public_html should be suitable for all ages. Adult material may be placed in adult_html and will be visible at http://adult.eskimo.com/~username.

The purpose of segregating adult content is to allow schools to limit access to adult content while still providing access to material that is acceptable and appropriate for students and also to allow parents who use safe surfing software to make that same distinction. Both hosts are implemented using exactly the same hardware and network infrastructure. There is absolutely no performance advantage to using one over the other.

The integration of your web hosting space with your shell account makes it possible to edit your website on the fly using shell editors such as ex/vi, emacs, or pico. In addition, it also makes it possible to use shell scripts or programs to update your website automatically. These may be scheduled to run periodically with cron.

Friday, April 20, 2007

Cable Feet

Cable feet is the length of a cable in feet. It is a term commonly used in DSL and other distance sensitive technologies to describe the length of the cable over which the signal must propagate.

Generally, the cable feet distance will be longer than the linear distance between two locations because usually the cable can not be run directly but must follow right-of-way such strung between telephone poles along a street.

As a consequence of this the cable-feet distance may be much greater than the straight line distance.

As an example, DSL Internet service is sensitive to distance. The more cable feet between your house and the telephone company central office, the slower the maximum obtainable speed, and beyond some distance the service is not available. You might be two miles line of sight from a central office but the cable might take a route that is five miles long to get there. That would be an extreme example but things like this can happen because of natural obstacles such as canyons or lakes.

Difference Between Cable and DSL

On the surface, DSL and cable modems may seem very similar but their implementations are quite different.

Cable companies like to make a big deal of the fact that the signal is being transmitted down a "fat wire", coaxial cable. The implications being that a fat wire means you can get lots of bits piped to you, fast. What they seem to neglect to tell you is that your bits are vying for space in that fat wire along with everyone else's.

DSL is using a twisted pair, skinny wire, that is part of a much larger bundle, and that bundle is actually a lot "fatter" than the cable company coax. But the relevant part here is only your bits go over that wire. It can't carry as many bits but those bits are all yours.

Cable speeds are insensitive to distance from the cable head end, but DSL is sensitive to distance from the central office.

Cable modems can provide a high burst speed, DSL can only match this high burst speed if you are close to the central office. Cable modems though share a common transmission medium and so to prevent customers from hogging bandwidth traffic shapers are generally used. This will cause your speed to slow down if you've exceeded some predefined limits on bandwidth usage. You may also experience slowness during high traffic times when everyone is using that fat wire at the same time.

DSL performance will not be traffic dependent unless there isn't enough bandwidth from the back end. If you are very close to the central office, say less than 3000 cable feet or so, then DSL is a definite win over cable. If you are further, say 10,000 cable feet, then which is best depends upon your needs. If you just want to browse the web then cable might be preferred, if you are a heavy download user or want to remotely backup files over your connection, then DSL is a better choice. Past about 14,000 cable feet, DSL becomes somewhat "iffy".

Cable companies are primarily in the business of selling content to their customers. Consequently, they tend to see data as an additional revenue stream that they do not want to interfere with their primary revenue stream. Cable companies will often place contractual restrictions on what you are allowed to do to prevent competition to their primary stream including things like placing a limit on how much video you can download in a given amount of time. Often cable companies offer telephone service as well and so they also will disallow using VOIP services other than service they offer.

Telco's will sometimes restrict VOIP on their own DSL Internet service, but generally not if you get a DSL circuit through them but DSL internet service through another ISP.

Cable companies generally offer little choice, if you get a cable modem from them they usually also require that you also use their Internet services.

With DSL, the circuit and ISP charges are separate so you have a choice of which ISP you use even if the telco is the only DSL circuit provider available.

Pricing varies widely for both cable modem and DSL providers so it is impossible to generalize on which is more cost effective. It depends heavily on what your needs and where you are located.

Wednesday, April 4, 2007

Executing X-Windows Applications On A Remote Host

X-windows provides the ability to execute a program on one computer, such as Eskimo North's shell server, but display and get keyboard and mouse input from another, such as your home computer or work station.

If you are running X-windows on a machine at home, you can run a graphical application on our server and display it remotely and type into it as if it were on your machine. Most Linux or Unix-like systems include an X-Windows package with the operating system distribution.

If you are running Microsoft Windows, you will need an X-server such as Cygwin/X installed on your machine.

It is possible even to run a desktop window manager on Eskimo North's shell server and control it from your machine. That is, it will take mouse and keyboard input from your computer and display to your computer. You will need appropriate start-up scripts and configuration files for window manager of your choice.

To allow this you have to do two things.
  1. On your machine allow our machine to access your display.
    xhost + eskimo.com
    Adjust the above to the appropriate command to allow Eskimo North's shell server to display on your X-server if you are using Microsoft Windows with an add-on X-server package such as Cygwin/X.

  2. On our end you need to indicate where to display by setting the environment variable DISPLAY and exporting it.
    export DISPLAY="myhost.mydomain.com:0.0"
    ... where myhost.mydomain.com is the name of your machine.
The above example is for ksh, if you use tcsh or bash, use the appropriate commands to set and export the DISPLAY variable for those shells.

If you use ssh, and x-forwarding is enabled, then only step 1 is necessary, on this end you can leave the display set to ":0.0" and ssh will take care of it.

Monday, April 2, 2007

Linux Kernel Configuration Code Maturity Level Options

If you select this option, it will enable the inclusion of incomplete or experimental device drivers or protocols. Otherwise these will not show up in the configuration menu.

In my own personal experience, if you are using something other than a very mainstream Intel box, there is probably something that you might need which still hasn't been declared stable and thus you will need this option.

Another note; stable seems to be in the eye of the beholder and there are device drivers that have been declared stable for years which are not, and there are device drivers which are still labeled experimental but which actually work quite well.
Google