The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

6. Solutions to Common Miscellaneous Problems

Q: Why Do FTP Transfers Seem to Hang?
Q: Why Does Free Dump Core?
Q: Why Does Netscape Crash Frequently?
Q: Why Won't My FTP or Telnet Server Allow Logins?
Q: How Do I Keep Track of Bookmarks in Netscape?
Q: Why Does the Computer Have the Wrong Time?
Q: Why Don't Setuid Scripts Work?
Q: Why Is Free Memory as Reported by free Shrinking?
Q: Why Does the System Slow to a Crawl When Adding More Memory?
Q: Why Won't Some Programs (E.g. xdm) Allow Logins?
Q: Why Do Some Programs Allow Logins with No Password?
Q: Why Does the Machine Run Very Slowly with GCC / X / ...?
Q: Why Does My System Only Allow Root Logins?
Q: Why Is the Screen Is All Full of Weird Characters Instead of Letters?
Q: If I Screwed Up the System and Can't Log In, How Can I Fix It?
Q: What if I Forget the root Password?
Q: What's This Huge Security Hole in rm!?!?!
Q: Why Don't lpr and/or lpd Work?
Q: Why Are the Timestamps on Files on MS-DOS Partitions Set Incorrectly?
Q: How Do I Get LILO to Boot the Kernel Image?
Q: How Do I Make Sure the System Boots after Re-Installing the Operating System?
Q: Why Doesn't My PCMCIA Card Work after Upgrading the Kernel?
Q: How Do I Remove (or Change) the Colors in the ls Display?
Q: Why Won't a Program Work in the Current Directory?

A: FTP transfers that die suddenly are due, apparently, to some form of overrunning buffer. It occurs both with Linux and Microsoft servers. On Linux systems, the problem seems to occur most commonly with the distribution's server software.

If you receive ftp: connection refused errors, then the problem is likely due to a lack of authentication. Refer to ``Why Won't My FTP or Telnet Server Allow Logins?.''

One remedy is to be replacing the distribution FTP server with the Linux port of the OpenBSD FTP server. The home page is:

To install the BSD server, follow the installation instructions, and refer to the manual pages for [inetd] and [inetd.conf]. (If you have the newer [xinetd], see below.) Be sure to tell [inetd] to run the BSD daemon alone, not as a subprocess of, for example, [tcpd]. Comment out the line that begins ``ftp'' in the [/etc/inetd.conf] file and replace it with a line similar to (if you install the new [ftpd] in [/usr/local/sbin/]):

 # Original entry, commented out. #ftp stream tcp nowait root /usr/sbin/tcpd



 # Replacement entry: ftp stream tcp nowait root /usr/local/sbin/ftpd -l


The replacement daemon will become effective after rebooting or sending (as root) a SIGHUP to inetd, e.g.:

 # kill -HUP inetd

To configure [xinetd], create an entry in [/etc/xinetd.d] per the instructions in the [xinetd.conf] manual page. Make sure, again, that the command-line arguments for [ftpd] are correct, and that you have installed the [/etc/ftpusers] and [/etc/pam.d/ftp] files. Then restart [xinetd] with the command: /etc/rc.d/init.d/xinetd restart. The command should report "OK," and the restart will be noted in the system message log.

A: This applies to server daemons that respond to clients, but don't allow logins. On new systems that have Pluggable Authentication Modules installed, look for a file named, "[ftp]," or "[telnet]," in the directory [/etc/pam/] or [/etc/pam.d/]. If the corresponding authentication file doesn't exist, the instructions for configuring FTP and Telnet authentication and other PAM configuration, should be in [/usr/doc/pam-]. Refer also to the answer for "FTP server says: ``421 service not available, remote server has closed connection.''."

If it's an FTP server on an older system, make sure that the account exists in [/etc/passwd], especially ``anonymous.''

This type of problem may also be caused a failure to resolve the host addresses properly, especially if using Reverse Address Resolution Protocol (RARP). The simple answer to this is to list all relevant host names and IP addresses in the [/etc/hosts] files on each machine. ( Refer to the example [/etc/hosts] and [/etc/resolv.conf] files in: "Sendmail Pauses for Up to a Minute at Each Command.") If the network has an internal DNS, make sure that each host can resolve network addresses using it.

If the host machine doesn't respond to FTP or Telnet clients at all, then the server daemon is not installed correctly, or at all. Refer to the manual pages: inetd and inetd.conf on older systems, or xinetd and xinetd.conf, as well as ftpd, and telnetd.

A: You probably have the same problem as in (``Why Won't Some Programs (E.g. xdm) Allow Logins?''), with an added wrinkle.

If you are using shadow passwords, you should put a letter `x' or an asterisk in the password field of [/etc/passwd] for each account, so that if a program doesn't know about the shadow passwords it won't think it's a passwordless account and let anyone in.

A: You may have too little real memory. If you have less RAM than all the programs you're running at once, Linux will swap to your hard disk instead and thrash horribly. The solution in this case is to not run so many things at once or buy more memory. You can also reclaim some memory by compiling and using a kernel with fewer options configured. See (``How To Upgrade/Recompile a Kernel'')

You can tell how much memory and swap you're using with the free command, or by typing:

 $ cat /proc/meminfo

If your kernel is configured with a RAM disk, this is probably wasted space and will cause things to go slowly. Use LILO or rdev to tell the kernel not to allocate a RAM disk (see the LILO documentation or type ``man rdev'').

A: You probably sent some binary data to your screen by mistake. Type echo ' c' to fix it. Many Linux distributions have a command, reset, that does this.

If that doesn't help, try a direct screen escape command.

 $ echo 'Ctrl-V Ctrl-O'

This resets the default font of a Linux console. Remember to hold down the Control key and type the letter, instead of, for example, Ctrl, then V. The sequence

 $ echo 'Ctrl-V Esc C'

causes a full screen reset. If there's data left on the shell command line after typing a binary file, press Ctrl-C a few times to restore the shell command line.

Another possible command is an alias, ``sane,'' that can work with generic terminals:

 $ alias sane='echo -e " c";tput is2;

 > stty sane line 1 rows $LINES columns $COLUMNS'

The alias is enclosed with open quotes (backticks), not single quotes. The line break is included here for clarity, and is not required.

Make sure that $LINES and $COLUMNS are defined in the environment with a command similar to this in [~/.cshrc] or [~/.bashrc],

 $ LINES=25; export $LINES; $COLUMNS=80; export $COLUMNS

using the correct numbers of $LINES and $COLUMNS for the terminal.

Finally, the output of ``stty -g'' can be used to create a shell script that will reset the terminal:

  1. Save the output of ``stty -g'' to a file. In this example, the file is named ``termset.'':

     $ stty -g >termset 

    The output of ``stty -g'' (the contents of ``[termset]'') will look something like:

  2. Edit ``[termset]'' to become a shell script; adding an interpreter and ``stty'' command:

     #!/bin/bash stty 500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73
  3. Add executable permissions to ``termset'' and use as a shell script:

     $ chmod +x termset $ ./termset

[Floyd L. Davidson, Bernhard Gabler]

A: The PCMCIA Card Services modules, which are located in [/lib/modules/]version[/pcmcia], where version is the version number of the kernel, use configuration information that is specific to that kernel image only. The PCMCIA modules on your system will not work with a different kernel image. You need to upgrade the PCMCIA card modules when you upgrade the kernel.

When upgrading from older kernels, make sure that you have the most recent version of the run-time libraries, the modutils package, and so on. Refer to the file [Documentation/Changes] in the kernel source tree for details.

Important: If you use the PCMCIA Card Services, do not enable the Network device support/Pocket and portable adapters option of the kernel configuration menu, as this conflicts with the modules in Card Services.

Knowing the PCMCIA module dependencies of the old kernel is useful. You need to keep track of them. For example, if your PCMCIA card depends on the serial port character device being installed as a module for the old kernel, then you need to ensure that the serial module is available for the new kernel and PCMCIA modules as well.

The procedure described here is somewhat kludgey, but it is much easier than re-calculating module dependencies from scratch, and making sure the upgrade modules get loaded so that both the non-PCMCIA and PCMCIA are happy. Recent kernel releases contain a myriad of module options, too many to keep track of easily. These steps use the existing module dependencies as much as possible, instead of requiring you to calculate new ones.

However, this procedure does not take into account instances where module dependencies are incompatible from one kernel version to another. In these cases, you'll need to load the modules yourself with insmod, or adjust the module dependencies in the [/etc/conf.modules] file. The [Documentation/modules.txt] file in the kernel source tree contains a good description of how to use the kernel loadable modules and the module utilities like insmod, modprobe, and depmod. [Modules.txt] also contains a recommended procedure for determining which features to include in a resident kernel, and which to build as modules.

Essentially, you need to follow these steps when you install a new kernel.

Inferno Solutions
Hosting by

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру