PC Plus HelpDesk - issue 240

This month, Paul Grosse gives you more insight into some of the topics dealt with in HelpDesk

From the pages of HelpDesk, we look at:

  • SSH remote host change;
  • Word counts in OpenOffice.org;
  • CD installation-set recognition problem on UNIX-like systems;
  • Hidden files in UNIX-like OSes;
  • Alternative uses for MP3 players;
  • TCP FIN scan attacks;
  • Configuring a DHCP server for a small network;
  • Configuring an SMB printer in SUSE 10.0;
  • Webmin;
  • BOGOMIPS;
  • Open Source Software for Windows; and,
  • PostScipt Sudoku answers from issue 239.
Paul Grosse

HelpDesk

SSH remote host change

If you dual boot with a computer and both (or at least some, if you are using more than two) operating systems support SSH (secure shell - encrypted using public key cryptography for key exchange) then, the fingerprint of the remote machine (the dual boot machine) will change for each OS that is used on there.

If you use Windows on that machine, you will have to have installed an SSH server on there to be able to log into it remotely but all grown-up operating systems come with SSH as part of the distribution.

To solve the problem, just delete the lines in the file that are identified in the warning. Here, the file is in the .ssh directory. Just open it up in a text editor and delete the lines, remembering to save the file before you have a go.

You could work around this problem by hacking the SSH configuration but there is a very good reason for it coming up with this and that is that the warning is a basic warning about man-in-the-middle attacks or people trying to break into your system so leave it alone and put up with it. If they want to break into a system they will have to use another method (no system is completely secure but that is no reason to go out to town and leave your front door open) so leaving this in place will keep all of the low to medium level hackers out.


Word counts in OpenOffice.org

The selected word count in OOo2 is not situated in the Properties dialogue box, it is under tools. This is (I presume) because highlighting a portion of text and wanting a count of those words is something that a hack like me - who is trying to write to a set number of words - will want to use regularly.

So, instead of typing [Alt]+[F], [I] for the properties page, you need to type [Alt]+[T], [W] for the 'Tools'/ 'Word Count' page. Click on the image on the right to see what you get.

Note that in Windows, the [Alt] key is sticky so once you have pressed it, you can release it if you want, before pressing the first key - in KDE, you have to hold down the [Alt] key while pressing the first letter. Whilst this might seem an advantage to Windows users, it is something of a double-edged sword. Sometimes, people press the [Alt] key by accident and don't realise what has happened. Just imagine what happens if you type the word 'ear' after having pressed the [Alt] key by mistake. On a KDE system, you would get the word 'ear'. On Windows, you would select all of the text and then replace it with the letter 'r'.


CD installation-set recognition problem on UNIX-like systems

If you run a UNIX-like operating system such as Linux or one of the BSDs, you could, once you have everything installed the way you want it, leave it running without rebooting it for months. It is also likely that you won't install anything for a long time as well.

With this in mind, it can come as something of a shock to you to find that if you do want to install something, the system won't recognise the CDROM with the install sets on it. It doesn't matter how much you clean the disc, it will not be recognised.

The reason for this is that the CD ROM reader has sat still for months, doing nothing. All that has happened is that dust has been sucked through the computer and where there is a shiny surface, it has settled.

The solution is to blow across it to remove the dust. Ideally, you should use one of the compressed air cans you can get in hardware shops but if you must use your lungs, make sure that your mouth is empty first as removing saliva could be a problem if you can't get at the lens.

On the right, you can see dust on this lens.

This could conceivably affect Windows machines as well if you let them run long enough.


Hidden files in UNIX-like OSes

On Linux systems or any UNIX-like OS including Mac OS X, OpenBSD, FreeBSD and NetBSD, files and directories whose names start with a dot are hidden by the system from normal operations such as ls (directory listing).

To see these files, you need to be explicit so, in ls, just use 'ls -a'.

In Windows, the hidden attribute does the same and, if you are unfortunate enough to have been hit with the Sony Rootkit Trojan, other files will be hidden as well.

In Mac OS X (which is very loosely based on FreeBSD although it is more like Windows than BSD), there are two other ways of hiding files:

  • Being listed in the '/.hidden' file - so much for keeping the root empty of files (a major faux pas in UNIX circles as these should go either in /etc or /var); and,
  • Having the 'invisible' attribute set. This is closer to Windows than UNIX.

In Konqueror - as you can see in the screen shot - change the listing view with 'View'/ 'Show Hidden Files'. You can see the same directory but one has the hidden files listed.

So, why hide files? Most of the time, it isn't to try to pull the wool over your eyes, it is simply to get them out of the way in normal work. You don't want to see all of your settings directories listed if you just want a normal listing of your home directory. If you do want to see them, doing so is easy, just as it is in DOS.


Alternative uses for MP3 players

If you've got an MP3 player but don't always want to listen to music, there are other things that you can use them for (and I'm not thinking about things like door stops or for stirring paint).

You can either rip your own resources such as CDs for language learning or there are a number of mp3 resources online. Here are a few:

  • The BBC (http://www.bbc.co.uk/) has a listen again feature that will allow you to download some whole programmes as mp3 files although you should be careful here as sometimes, they will use RealMedia files instead (so that it is streaming). There doesn't appear to be any consistency here at the moment. Also, as a television license payer myself, I wonder why the BBC insists on paying royalties for mp3 files that it serves when it could spend less by using Ogg Vorbis instead (there is no royalty to pay to any file format patent holder for using the Ogg file format).
  • Radio Lovers (http://www.radiolovers.com/) has some good classics on it from a vide variety of sources; and,
  • Orson Welles' notorious broadcast of War of the Worlds (amongst many others) can be found at http://www.mercurytheatre.info/.

TCP FIN scan attacks

Sometimes, people claim that they haven't been spending as much time on a particular program as they really have - this is usually browsers or instant messenger programs.

Some online chat servers send TCP FIN packets after the connection has closed and these can look to a firewall like an attack. With a hardware firewall (and some software firewalls), you can get it to send you an email whenever this happens. So, when someone says that they have finished half an hour before the firewall has send you a message saying that they did, you can question that legitimately. It is worth pointing out that these apparent attacks (they aren't really attacks but the firewall treats them as possible attacks so that you know if you are really under attack) don't necessarily represent the exact moment that a connection has been dropped.

So, if your daughter claims that she finished on here instant messenger at 10:30pm when she was supposed to and you get an email like the one in the screenshot, you know that you can say; 'Computer says; "No".'


Configuring a DHCP server for a small network

If you have started off with a small network and used the hosts files on each machine, you might start to find that as you increase the number of hosts on the network, the amount of work involved with keeping each host's hosts files up-to-date increases very quickly. The quick answer to this is to use Dynamic Host Configuration Protocol (DHCP). In the screenshot on the right, you can see a typical exchange between a new host and the server.

Virtually every machine expects to see a DHCP server on it's ethernet connection and therefore uses it by default. If you use KNOPPIX, it will look for a DHCP server during boot up. So, it would be very handy to have your own DHCP server on your LAN.

DHCP will allow you to save your static addresses but also permit you to have a pool of addresses that are alllocated dynamically.

Firstly, you need to install the server which should be on your distribution disc set. With it now installed, open up a file browser and go to the /etc directory. In there, you should now see a file called 'dhcpd.conf'. The default file usually has plenty of notes about how you do this and that, showing how flexible it is but this can appear complicated for a basic configuration so copy it to the same directory and call it something like 'dhcpd.conf.old'.

Load up the existing dhcpd.conf file and delete the entire contents. Then, try the following...

default-lease-time 600;
max-lease-time 7200;
ddns-update-style ad-hoc;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.5.255;
option routers 192.168.5.254;
option domain-name-servers 192.168.5.254;
option domain-name "yourdomain.com";

subnet 192.168.5.0 netmask 255.255.255.0 {
  range 192.168.5.50 192.168.5.80;
  range 192.168.5.100 192.168.5.150;
}

host desktop1 {
  hardware ethernet 00:00:DC:2E:A6:0D;
  fixed-address 192.168.5.1;
}

host laptop2 {
  hardware ethernet 00:00:DC:2E:A4:36;
  fixed-address 192.168.5.90;
}

This specifies the network parameters the machine needs and will give your machines a reasonable lease time. The default lease is given when a lease length is not requested whereas the maximum lease time is given when it is.

In addition, we have specified two ranges of IP addresses for the DHCP pool - from 50 to 80 and 100 to 150 in this case.

Also, we have specified the IP addresses of two specific hosts by defining their Ethernet addresses.

Start the server in a console by entering
/usr/sbin/dhcpd -d -f eth1

where eth1 is the interface in this case. Note that if you are using eth0, there is usually no need to specify the interface. The -d switch makes dhcpd log to stderr so you'll be able to see what is happening and the -f switch keeps dhcpd in the foreground.

Boot up a machine on your network so that it uses DHCP (a machine with a KNOPPIX disc will do if you don't have one already configured to use DHCP) and watch what happens in the console. If it all works well (that is to say that you can browse the network/Internet from the KNOPPIX machine), press [Ctrl][C] to kill the dhcp server and then start up dhcpd again without the -d and -f switches by typing

/usr/sbin/dhcpd eth1

If you use eth1 or another interface and you have found that you need to use it on the command line, you might need to alter the runlevel dhcpd file in '/etc/rc.d' so that the dhcpd run line includes the interface. Note that '/etc/rc.d/dhcpd' might not be on your system if it boots up differently.

If you want to start it up by hand each time you boot the server, just leave a note to yourself in your 'bootup_readme.txt file on your root desktop.


Configuring an SMB printer in SUSE 10.0

If you have a printer already established on another machine and that machine tends to be in use all of the time, you can configure your Linux machine to use the printer network share.

Note that for security's sake, you have your LAN behind a firewall otherwise, other people will be able to hack your Windows machines

On the Windows machine (if it is one), just enable network sharing and then, in Windows Explorer, click on the Printer folder in the tree in the left pane (under My Computer) and then right click on the printer you want to share.

Next, select the 'Sharing' tab and select the 'Shared As' option button. Next, type in a share name (uppercase and no spaces is usually a good idea) and anything else you want to add to the other fields.

Click on 'Ok' and that is it as far as putting it on the network is concerned.

On your Linux box, open up the KDE 'Control Center' and in the tree on the left, select 'YaST2 Modules'/ 'Printer'.

Type in the SuperUser password at the prompt if you need to (your don't have to have logged into a KDE session as root to configure the printer but you do need to be root whist you configure it).

Next, the configuration page displays and it checks through its list. If this is the first time, it will build up a database which might take a minute.
In the next page, click on the 'Add' button then select the 'Print via SMB Network Server' option and click on 'Next'.
On the 'Connection Information' form, you need to type the particulars of the SMB server you need to use.

When you have done, click on the 'Test Remote SMB Access' button to see if it is all right.

Then, click on 'Next'.

In 'Queue Name', give the name for printing as something that is easy to type because you might decide to do this using the command line one day. Also, make the 'Printer Description' fairly meaningful.

Click on 'Next'.

In 'Printer Model', select the manufacturer and Model of the printer you are using.

If you cannot find the specific one you are looking for, you might like to try one in the same series of printers as yours or, you can look at the generic printers listed under 'unknown manufacturer'.

If you know that a particular printer driver exists and want to use that, you can click on 'Select PPD File'.

In the 'PPD Files' dialogue, you can select specific drivers

You can also test the PPD files by printing a test page.

If you do print the test page, it should look like this.

With the correct PostScript Printer Driver file selected, click on 'Next'

You should now see your printer in the printer list. Click on 'OK'.
Now that to your configuration is complete, click on 'OK'.
Next time you want to print something, you should see the printer appear in the printer list when you want to print a document.
If you click on Properties, you can change the printer configuration such as colour depth and resolution.

Webmin

If you have a number of machines on your LAN that you want to configure all remotely, you can do so using Webmin.

On the local machine, you can use various configuration files and programs to get the system looking and working just the way you want but if you want a central console from which you have access to all of the machines on your LAN, you need something that is designed to do the job.

Webmin allows you to configure hardware and software as well as look at the status of various system components. Not only does it do this for the local host but is also allows you to do the same for any host with a Webmin server running on it. It does this through a standard web browser running on any platform.

This program comes as part of the standard SUSE install and is actually a web server and some CGI scripts. Sections cover the local system and servers through to hardware and clusters.

The program is available for many operating systems and keeps on getting voted best system administration program of the year and so on so it is certainly worth a look - especially as it is free.

Instead of using Webmin just for configuration, you can use it to monitor some components of a system. In the screenshot on the right, you can see disc and partition usage - you can also use it to look at your mail. There are many uses of this program and you can see more about it at http://www.webmin.com/.

The program is very cross-platform although for the reason that each UNIX-like operating system uses different locations for configuration files, there is only support for systems that it has been configured for. Straigtht from the Webmin site, at the time of writing, Webmin (version 1.250) is supported by the following OSes:

  • Sun Solaris;
  • Lycoris Desktop/LX;
  • Caldera OpenLinux eServer and Caldera OpenLinux;
  • Whitebox Linux;
  • Tao Linux;
  • CentOS Linux;
  • Scientific Linux;
  • Gralinux;
  • Redhat Enterprise Linux and Redhat Linux Desktop;
  • AlphaCore Linux;
  • X/OS Linux;
  • Asianux;
  • Haansoft Linux;
  • cAos Linux;
  • Redhat Linux;
  • White Dwarf Linux;
  • Slackware Linux;
  • Xandros Linux;
  • APLINUX;
  • Debian Linux;
  • SuSE OpenExchange Linux, SuSE SLES Linux and SuSE Linux;
  • United Linux;
  • Corel Linux;
  • TurboLinux;
  • Cobalt Linux;
  • Mandrake Linux and Mandrake Linux Corporate Server;
  • pclinuxos Linux;
  • Conectiva Linux;
  • ThizLinux Desktop and ThizServer;
  • MSC Linux;
  • SCI Linux;
  • LinuxPPC;
  • Trustix SE and Trustix;
  • Tawie Server Linux;
  • TinySofa Linux;
  • Cendio LBS Linux;
  • Ute Linux;
  • Lanthan Linux;
  • Yellow Dog Linux;
  • Corvus Latinux;
  • Immunix Linux;
  • Gentoo Linux;
  • Secure Linux;
  • OpenNA Linux;
  • SoL Linux;
  • Coherent Technology Linux;
  • Playstation Linux;
  • StartCom Linux;
  • Yoper Linux;
  • Caixa Magica;
  • FreeBSD, DragonFly BSD, OpenBSD, NetBSD and BSDI;
  • HP/UX;
  • SGI Irix;
  • DEC/Compaq OSF/1;
  • IBM AIX;
  • SCO UnixWare and SCO OpenServer;
  • Mac OS X, Darwin and OpenDarwin;
  • Cygwin;
  • Sun Java Desktop System;
  • Generic Linux; and,
  • Windows.

Yes, Windows.


BOGOMIPS

BOGOMIPS or bogus MIPS is a measure of how fast the processor is and, like any MIPS rating, it is open to abuse and misuse. It can be used as an aid to get an appreciation about how fast a given computer is but its primary reason for existing is so allow Linux to function in a timely fashion where timing is important.

To get to the BOGOMIPS value on a Linux box, just type

cat /proc/cpuinfo

Note that in order to do this, you need a /proc directory so doing this on OpenBSD will not work as that does not have a /proc directory - there are programs for the BSD OSes though - see the link below.

If you are interested in this and run a Windows machine, you can either run KNOPPIX and do as above or, you can download the bogomips Windows executable which can be found at http://hpm101.gotadsl.co.uk/projects/bogobinaries/.

Fave fun.


Open Source Software for Windows

Open Source software is usually seen as being run only on UNIX-like systems such as the many flavours of Linux or the BSD family (other Unices are also catered for). However, there are plenty of projects that also have ports to Windows and DOS.

Examples include:

  • OpenOffice.org;
  • The GIMP;
  • Firefox;
  • Apache;
  • wget;
  • Webmin; and, so on.

Many of these have their own dedicated websites but for the smaller projects - as well as some of the larger ones - there are two main repositories for the many programs either as source that you can compile yourself or as already compiled executables ready for whatever operating system you have.

These are Sourceforge ( http://sourceforge.net/ above-right) and Feshmeat ( http://freshmeat.net/ right).

PostScipt Sudoku answers from issue 239

If you have installed (if you needed to) a Post Script reader of some sort and you have printed out and solved the Sudoku problems I left you with last month, you might like to know the answers to any that you had a problem with. Click here to open up the directory in a new window so that you can see the solution files.

Back to PC Plus Archive Index Page