Best of Technical Support

Various

Issue #37, May 1997

Our experts answer your technical questions.

Netscape On MkLinux

I have installed MkLinux on my Mac 6100. I log in and ftp Netscape. When I try to run the executable I get an error message saying I can't run the binary. —Manny Duarte

No MkLinux Binary

As far as I know, Netscape does not support MKLinux. The binary they supply for Linux is compiled for Intel CPUs. It will not work on a Mac. —Bob Hauck, Wasatch Communications Group bobh@wasatch.com

Terminating pppd

I am running kernel 1.2.13 and pppd 2.1.2 on a remote machine and kernel 2.0.18 and pppd 2.2.0 on a local machine to connect to the remote machine by modem. When the modem drops carrier (due to line noise, etc.) the remote pppd process remains active, preventing getty accepting any more connections until pppd is killed.

Is it possible to have the remote pppd terminate automatically when the modem drops the carrier? —Eskinder Mesfin

Running pppd Manually

The modem option does exactly that, assuming that your modem is set up to have the DCD signal follow the carrier state and that your cables pass all of the relevant signals through to the serial port. Most modems will operate DCD in the desired mode if you include AT&C1 in the init string.

However, if you are manually running pppd on the remote machine after logging in to a shell, there is a caveat. In that case you need to exec pppd rather than simply running it.

If you just run pppd from the command line, the shell, rather than the pppd process, will get the SIGHUP signal when you hang up. The shell will terminate but leave the pppd daemon running. Instead, do exec pppd. This will replace the running shell with pppd so that the hang-up signal will work correctly. —Bob Hauck, Wasatch Communications Group bobh@wasatch.com

Generating RARP Requests

I need to set up a large number of Linux boxes as X-terminals. I would like to automate the addressing of these boxes through RARP, preferably. I have had little trouble learning how to make a Linux box answer RARP queries, but I can't seem to make it generate one. Any help you could offer would be appreciated. —George

Enabling RARP

The kernel can do it. You can boot a kernel, have it generate a RARP request, and then use the machine that answers as an NFS server. It can do the same using the BOOTP protocol as well. These options must be enabled during the make config of the kernel.

I suspect what you want is something like what a Sun workstation does, which is to get a kernel from the network starting with a RARP request. That kind of thing can be done only with special ROMs available only for certain Ethernet cards. You can likely find information at http://sunsite.unc.edu/linux. I recommend using small hard disks or booting a kernel from floppy to an NFS server. It is much easier to work with. —Donnie Barnes, Red Hat Software redhat@redhat.com

Plug and Play Modems

I used Windows 95 before Linux; that's why I got a plug and play modem. It works with Windows 95 but it does not work in Linux. Why? —Stou Sandalski

Two Types of Plug and Play

There are two different types of internal modems that fall into the plug and play category. The first is a standard modem that is simply configured at boot time to determine what COM port it will provide. The second is called a WinModem.

A WinModem does not have a UART, which is what makes a normal serial port tick. Instead, they knock down the price of the modem by $10-$20 and eliminate this normally necessary component of any serial port or modem. It is replaced with a software driver that emulates the UART's functionality.

If you have, or think you have, such a modem, your only hope would be to ask the manufacturer whether they support Linux for that modem. If not, the modem cannot be used under Linux. If you do not have a WinModem, you should be fine, provided you set the modem up correctly.

No two modems are identical. Your best bet is to consult the manufacturer. In most cases, if you do not have a product that will work under Linux, they will provide an upgrade at a very low cost. —Chad Robinson, BRT Technical Services Corporationredhat@redhat.com

Users Cannot Change Password

I have installed shadow-ina-box-1.2 and all the accounts that I created after the installation get the following error when they try to change their password:

homepage:~$passwd
Changing password for user_name
The password for user_name cannot be changed

Is there a solution to this or will I have to revert to an open password file? —Mike Pelley

Changing Permissions

I'd guess that one of two things is happening here. Either your passwd binary doesn't have the right permissions, or you are still using your old non-shadow passwd binary.

In order for passwd to make changes to the passwd file, it must be suid root. To check this, try doing ls -l `which passwd`. It should print something like this:

-r-s--x--x   1 root     bin          3152 May  4  1994 /usr/bin/passwd

The important things are the s in the first column and the root in the third column. If you don't see the s, do a chmod u+s `which passwd` as root. If the file isn't owned by root (the root in the third column), do chown root `which passwd`.

Before you do all of that though, double check that what you are running really is the binary that shadow-ina-box installed. Do which passwd and make sure that's the right passwd binary. —Steven Pritchard, Southern Illinois Linux Users Group stever@silug.org

Converting Text To PostScript

I print over a network setup. My problem is that when I print text files I cannot control the font size, and lines are cut off at the end. Is there any utility that will help me convert a text file to PostScript in any font size, because I have no problem printing PostScript. —Eskinder Mesfin

Multiple Solutions

GNU enscript is a drop-in replacement for the enscript program. Enscript converts ASCII files to PostScript and writes the generated output to a file or sends it directly to the printer.

It is available from: prep.ai.mit.edu:/pub/gnu/enscript-1.4.0.tar.gz. —Rory Toma, WebTV Networks rory@corp.webtv.net

The nenscript program does what you want. It has numerous options to control the font, paper size, lines per page, number of copies, and so forth.

You might want to look into the magicfilter utility. This is a nifty little program that allows you to transparently print almost any kind of file to any reasonable printer. It installs as a print filter and uses some heuristics to determine the file type and work accordingly. I got my copy from Sunsite. —Bob Hauck, Wasatch Communications Group bobh@wasatch.com

Try the apsfilter (aps 4.9.1) available on every linux-mirror. —Klaus Franken, S.u.S.E. GmbHkfr@suse.de