/Tony Lawrence

About Tony Lawrence

This author has not yet filled in any details.
So far Tony Lawrence has created 47 blog entries.

PATH, Command

2010-05-26T11:20:54+00:00 May 13th, 2005|Linux|

Your PATH (echo $PATH) is where your shell will search for executables. If a command you want to run isn't included in $PATH, you have to be specific: /somewhere/someprog. One confusion for Unix/Linux newcomers is that if PATH doesn't include "." (current directory), then trying to run a program you can see right in front of your nose with "ls" is going to generate a "command not found" message from your shell.


2010-05-26T11:21:01+00:00 May 13th, 2005|Linux|

Syslog is a wonderful thing. In theory, it lets an administrator fully control where and how messages get logged. Of course, the first requirement is that the program you wish to control uses syslog for logging, but even assuming that it does, it can still be difficult to get what you want.

Hardening your Kernel with OpenWall

2010-05-26T11:22:14+00:00 May 12th, 2005|Linux|

The Openwall Project provides security related kernel patches for Linux and BSD kernels. I read about this in Hardening Linux by James Turnbull. The patch that most interested me was to prevent executable code from running in the stack. That won't prevent all buffer overflow attacks, but it can stop some of them. I really don't understand why this isn't just the default nowadays - I know it can break some programs and debuggers, but it seems smart to me

Using Sudo

2010-05-26T11:21:29+00:00 May 12th, 2005|Linux|

Most Unix systems have some way of letting ordinary users perform certain tasks as root or some other privileged user. SCO Open Server has "asroot" and can also directly assign "authorizations" such as backup privileges or being able to change other user's passwords. SCO Unixware/Open Unix 8 have a similar facility in "tfadmin". Many Unixes, and Linux, use "sudo".

Lost Root Password (Linux)

2010-05-26T11:21:45+00:00 May 11th, 2005|Linux|

I have a very good memory. I remember most of my client's passwords (there are a few I forget regularly for no reason that I can understand, but I really do know most), I remember telephone numbers, and of course I know my own passwords. That last isn't as easy as it might sound, because I have quite a few different systems and each has its own password, but though I might use the wrong one now and then, I'll get it on the second or third try.

How Can I Mount a ISO Image CD?

2010-05-26T11:21:59+00:00 May 11th, 2005|Linux|

You have an image of a CD or perhaps of a floppy disk. You may have downloaded it, or created it by reading a real device with "dd". Now you want to mount that image. You could write it back out to media and mount that, but that may not be convenient or even possible at the moment.

Handling Missing Data in Inputs

2010-05-26T11:25:20+00:00 May 3rd, 2005|CGI and Perl|

Missing data can be very annoying to a programmer. In fact, it is so annoying that very often we'll write separate programs to clean up data and eliminate unpleasant conditions so that the main program doesn't have to deal with it. Here, I'll show some examples of the kind of problems we see.

Replacing a Spreadsheet

2010-05-26T11:25:00+00:00 May 3rd, 2005|CGI and Perl|

Spreadsheets can be powerful tools, and particularly so in the hands of an expert user. A spreadsheet can be used to reorganize data and to extract information not otherwise available. For example, at a client site, an application report generates a listing of hourly billing, but can't give the cross-reference totals desired. The raw output looks something like this: