Best of Technical Support

by Various
Forgotten Password

I cannot log on. My old password doesn't work. I am the root on this system. How can I change the password or verify my old password? —Kevin Cary Red Hat 2.0.30

This is a much debated topic since it essentially involves breaking your system's security. The main discussion point always seems to be how to do it without letting people do it to others. For the most part, it is easy to remove the root password from Linux (and many other flavors of Unix) servers, as long as the machine has a floppy drive that it boots from by default.

If you have a standard Linux system without shadow passwords, you can simply boot from a “boot and root” floppy disk set, mount your partition and edit the /etc/passwd file. In this file, fields are separated by the colon (:) character. The second field on the first line can be removed (so the entry looks like ::) and root will no longer have a password. You can then reboot, log in as root and use passwd to set the new root password. —Chad Robinson, BRT Technical Services Corporation chadr@brttech.com

Choosing A Distribution

Which distribution should I download? Sorry about this low-level question, but I couldn't find help elsewhere. —Erik Rask

That's a question that can easily spark religious debates, but I'll side step that issue and just mention that there's a rather well-written Distribution HOWTO available from any Linux Documentation Project mirror (i.e., http://www.silug.org/LDP/) that describes the differences between distributions. —Steven Pritchard steve@silug.org

Slow Modem Connection

I need help in determining why my modem connection is so slow. I have a 33.6Kb modem that runs fine in Windows, but I just haven't found all of the files I must edit for making pppd run as fast as possible. —Paul Carff

pppd has a setting called asyncmap, that is a mask of characters which it must escape. This masking allows pppd to be run across lines that may not handle all 256 characters of the ASCII set. A common example of this is a line that must use software flow control in the form of the ctrl-S and ctrl-Q characters to pace the flow of data. pppd cannot send those characters directly since they would interfere with the operation of the flow control; so, it sends another two characters (the escape and the replacement character) instead.

If no asyncmap parameter is set (as described in the pppd man page), pppd will automatically escape all control characters just to be sure the transmission is not interrupted. Obviously, this adds a good deal of overhead to the transmissions. Setting the asyncmap to 0 results in a noticeable increase in transfer rates on most systems. —Chad Robinson, BRT Technical Services Corporation chadr@brttech.com

Reconfiguring the Mouse

I just installed Red Hat 4.1, and I made a mistake while setting up the mouse. I set the mouse port to 1, but the real mouse port is 2. How can I change the mouse port?

—Moon Ill June

The best way is to run mouseconfig from the command line. It will let you choose the port just as you did at install time. —Donnie Barnes, Red Hat Software redhat@redhat.com

Kernel Stack Corruption

I am running 2.0.7 and have tried to compile the kernels of 2.0.27, 2.0.30 and 2.1.x, all of which give me the same error on execution. All of the kernels compiled successfully, but they crashed on bootup with the message “kernel stack corruption”. What could be wrong? —Thomas S. Chin

Start by using a good memory checker to check your system RAM. The kernels you listed are known to be stable, and the kernel stack is somewhat difficult to corrupt since it's well protected by the operating system.

Also, investigate your BIOS settings to make sure they match your memory type and CPU-cache type. If it can be set, be sure your BIOS has the same speed setting (60ns or 70ns) as your system RAM and your cache type (write-back, write-through, et cetera) matches what you actually have. —Chad Robinson, BRT Technical Services Corporation chadr@brttech.com

Jumbled Text and Setting Color

I like color as a means of segregating data and reducing eye strain. I looked at all the escape sequence information I could find and set PS1 (where _ is a space) to:

\033[36m\u_\033[33m\W_\$_--\033[32m_

The user name is cyan, the directory and root prompt are brown and the rest is green. However, when I try to edit a history command, strange things occur when backspacing and the command text becomes jumbled. What am I missing? —Jim Red Hat 4.1

The shell probably doesn't care what escape sequences you use. The problem area is more likely your terminal. Investigate the terminal program you are using to log in and be sure it supports proper ANSI sequences. Be sure that it properly handles setting a color when another is already set. Never turn off colors at the end of your prompt. Try an esc[0m at the end of the line (sacrificing color for the text you type) and see if that helps.

This is especially true since a colorized ls listing causes trouble for you. The listing is turning on and off individual colors (with the default ls settings), and terminals that don't support it will have problems with pre-existing color settings. —Chad Robinson, BRT Technical Services Corporation chadr@brttech.com

Setting Time

Although my DEC Alpha NFS server and the Linux machines all have the same local time, every file written to the NFS partition in the Linux machines is one hour (exactly one hour) ahead in time. For example, if both the server and a Linux client have 20:30, and the client writes a file to the NFS partition, the time of creation of the file is 21:30. How can I correct this problem? —Jose Luis Richardo ChavezRed Hat Linux 4.2 and 4.1

Linux adjusts the time displayed by the date command for your local time zone. It's possible to see the “correct” time from date, if your system's internal notion of the correct time and the time zone setting are both wrong. For example, if your internal clock is an hour fast, but your time zone is an hour behind, you'll see the behavior you described. Check the time zone output in the date command. For example:

Mon Aug 4 12:12:53 PDT 1997

indicates we are currently running Pacific Daylight Time. On Red Hat systems you want /etc/localtime to be a link to a file in /usr/lib/zoneinfo.

Also, you generally want your system to store time in your local time. Edit the /etc/sysconfig/clock file, so that you have:

UTC=false
ARC=true

Then go into your system's BIOS setup to check that the local time is set correctly. —Larry M. Augustin, VA Research lma@varesearch.com

Running XDM

How do I properly run XDM at system bootup? —Aris Seisums Slackware 1.3.20

I'll assume you've got X and XDM set up properly; if not, read the man page. Most distributions provide an XDM setup that works, so you may be able to just use it. Also, make sure you can use startx to get into X after logging on in the normal way.

Next, look for a line like:

id:5:initdefault

in your /etc/inittab file. This will tell you what run level init starts at. The run level is the number in the middle. Add a line like this:

x:5:respawn:/usr/bin/X11/xdm -nodaemon
to the /etc/inittab file. For the 5 shown above, substitute the run level you're running at—then reboot.

If you want to test this first (good idea), pick a different run level (one below) to run XDM at. Don't pick 0, 1 or 6 as these have special meanings. Then, as root, run telinit<\!s>runlevel to switch to that run level. If it doesn't work, telinit<\!s>regular<\!s>runlevel will switch you back. —Jeff Licquia jeff@web.lanscape.net

Load Disqus comments