Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 66ff8a1298a082e86e45594a1ef51dda > files > 11

faq-1.0-3mdk.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
 <TITLE>Linux Frequently Asked Questions with Answers: Solutions to common miscellaneous problems. </TITLE>
 <LINK HREF="Linux-FAQ-7.html" REL=next>
 <LINK HREF="Linux-FAQ-5.html" REL=previous>
 <LINK HREF="Linux-FAQ.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="Linux-FAQ-7.html"><IMG SRC="next.gif" ALT="Next"></A>
<A HREF="Linux-FAQ-5.html"><IMG SRC="prev.gif" ALT="Previous"></A>
<A HREF="Linux-FAQ.html#toc6"><IMG SRC="toc.gif" ALT="Contents"></A>
<HR>
<H2><A NAME="Solutions to common miscellaneous problems."></A> <A NAME="s6">6. Solutions to common miscellaneous problems. </A></H2>

<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="free dumps core."></A> <A NAME="ss6.1">6.1 free dumps core. </A>
</H2>

<P>In Linux 1.3.57 and later, the format of /proc/meminfo was changed in a way
that the implementation of free doesn't understand.
<P>Get the latest version, from sunsite.unc.edu, in
/pub/Linux/system/Status/ps/procps-0.99.tgz.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="My clock is very wrong."></A> <A NAME="ss6.2">6.2 My clock is very wrong. </A>
</H2>

<P>There are two clocks in your computer.  The hardware (CMOS) clock runs
even when the computer is turned off, and is used when the system
starts up and by DOS (if you use DOS).  The ordinary system time,
shown and set by ``date,'' is maintained by the kernel while Linux is
running.
<P>You can display the CMOS clock time, or set either clock from the other,
with /sbin/clock program--see ``man 8 clock.''
<P>There are various other programs that can correct either or both
clocks for system drift or transfer time across the network.  Some of
them may already be installed on your system.  Try looking for
adjtimex (corrects for drift), netdate, and getdate (get the time from
the network), or xntp (accurate, full-featured network time daemon).
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="Setuid scripts don't seem to work."></A> <A NAME="ss6.3">6.3 Setuid scripts don't seem to work. </A>
</H2>

<P>That's right.  This feature has been disabled in the Linux kernel on
purpose, because setuid scripts are almost always a security hole.
Sudo and SuidPerl can provide more security that setuid scripts or
binaries, especially if execute permissions are limited to a certain
user ID or group ID.
<P>If you want to know why setuid scripts are a security hole, read the
FAQ for comp.unix.questions.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="Free memory as reported by free keeps shrinking."></A> <A NAME="ss6.4">6.4 Free memory as reported by free keeps shrinking. </A>
</H2>

<P>The ``free'' figure printed by free doesn't include memory used as a disk
buffer cache--shown in the ``buffers'' column.  If you want to know how
much memory is really free add the ``buffers'' amount to ``free''--newer
versions of free print an extra line with this info.
<P>The disk buffer cache tends to grow soon after starting Linux up.  As you
load more programs and use more files, the contents get cached.  It
will stabilize after a while.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="When I add more memory, the system slows to a crawl."></A> <A NAME="ss6.5">6.5 When I add more memory, the system slows to a crawl. </A>
</H2>

<P>This is a common symptom of a failure to cache the additional memory.
The exact problem depends on your motherboard.
<P>Sometimes you have to enable caching of certain regions in your BIOS
setup.  Look in the CMOS setup and see if there is an option to cache the
new memory area which is currently switched off.  This is apparently most
common on a '486.
<P>Sometimes the RAM has to be in certain sockets to be cached.
<P>Sometimes you have to set jumpers to enable caching.
<P>Some motherboards don't cache all of the RAM if you have more RAM per
amount of cache than the hardware expects.  Usually a full 256K cache will
solve this problem.
<P>If in doubt, check the manual.  If you still can't fix it because the
documentation is inadequate, you might like to post a message to
comp.os.linux.hardware giving <EM>all</EM> of the details--make, model
number, date code, etc., so other Linux users can avoid it.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="Some programs (e.g. xdm) won't let me log in."></A> <A NAME="ss6.6">6.6 Some programs (e.g. xdm) won't let me log in. </A>
</H2>

<P>You are probably using non-shadow password programs and are using shadow
passwords.
<P>If so, you have to get or compile a shadow password version of the
programs in question.  The shadow password suite can be found at
tsx-11.mit.edu:/pub/linux/sources/usr.bin/shadow/.
This is the source code.  The binaries are probably in 
linux/binaries/usr.bin/.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="Some programs let me log in with no password."></A> <A NAME="ss6.7">6.7 Some programs let me log in with no password. </A>
</H2>

<P>You probably have the same problem as in ``
<A HREF="#Some programs (e.g. xdm) won't let me log in.">Some programs (e.g. xdm) won't let me log in.</A>
'', with an added wrinkle.
<P>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.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="My machine runs very slowly when I run GCC / X / ..."></A> <A NAME="ss6.8">6.8 My machine runs very slowly when I run GCC / X / ... </A>
</H2>

<P>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 less options configured.
See ``
<A HREF="Linux-FAQ-7.html#How do I upgrade/recompile my kernel?">How do I upgrade/recompile my kernel?</A>
''.
<P>You can tell how much memory and swap you're using with the free
command, or by typing:
<PRE>
cat /proc/meminfo
</PRE>

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 <CODE>man rdev</CODE>).
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="I can only log in as root."></A> <A NAME="ss6.9">6.9 I can only log in as root. </A>
</H2>

<P>You probably have some permission problems, or you have a file
/etc/nologin.
<P>In the latter case, put <CODE>rm -f /etc/nologin</CODE> in your
<CODE>/etc/rc.local</CODE> or <CODE>/etc/rc.d/*</CODE> scripts.
<P>Otherwise, check the permissions on your shell, and any file names
that appear in error messages, and also the directories that contain
these files, up to and including the root directory.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="My screen is all full of weird characters instead of letters."></A> <A NAME="ss6.10">6.10 My screen is all full of weird characters instead of letters. </A>
</H2>

<P>You probably sent some binary data to your screen by mistake.  Type
<CODE>echo '\033c'</CODE> to fix it.  Many Linux distributions have a
command, ``reset,'' that does this.  
<P>If that doesn't help, try a direct screen escape command.  
<PRE>
echo &lt;Ctrl-V>&lt;Ctrl-O>
</PRE>

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-V'.  The sequence
<PRE>
echo &lt;Ctrl-V>&lt;Esc>c
</PRE>

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.
<P>[Bernhard Gabler]
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="I have screwed up my system and can't log in to fix it."></A> <A NAME="ss6.11">6.11 I have screwed up my system and can't log in to fix it. </A>
</H2>

<P>
<P>Reboot from an emergency floppy or floppy pair.  For example, the
Slackware boot and root disk pair in the install subdirectory of the
Slackware distribution.
<P>There are
also two, do-it-yourself rescue disk creation packages in 
<A HREF="sunsite.unc.edu/pub/Linux/system/Recovery">sunsite.unc.edu/pub/Linux/system/Recovery</A>.  These are better
because they have your own kernel on them, so you don't run
the risk of missing devices and file systems.
<P>Get to a shell prompt and mount your hard disk with something like
<PRE>
mount -t ext2 /dev/hda1 /mnt
</PRE>

Then your file system is available under the directory <CODE>/mnt</CODE>
and you can fix the problem.  Remember to unmount your hard disk
before rebooting (<CODE>cd</CODE> somewhere else first, or it
will say it's busy).
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="I've discovered a huge security hole in &lt;tt>rm&lt;/tt>!"></A> <A NAME="ss6.12">6.12 I've discovered a huge security hole in <CODE>rm</CODE>! </A>
</H2>

<P>No you haven't.  You are obviously new to Unix and need to read a good
book to find out how things work.  Clue: the ability to delete files
under Unix depends on permission to write in that directory.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="&lt;tt>lpr(1)&lt;/tt> and/or &lt;tt>lpd(8)&lt;/tt> don't working."></A> <A NAME="ss6.13">6.13 <CODE>lpr(1)</CODE> and/or <CODE>lpd(8)</CODE> don't work. </A>
</H2>

<P>First make sure that your <CODE>/dev/lp*</CODE> port is correctly configured.
Its IRQ (if any) and port address need to match the settings on the
printer card.  You should be able to dump a file directly to the printer.
<PRE>
cat the_file >/dev/lp1
</PRE>

If lpr gives you a message like ``myname@host: host not found,'' it may
mean that the TCP/IP loopback interface, lo, isn't working properly.
Loopback support is compiled into most distribution kernels.  Check
that the interface is configured with the <CODE>ifconfig</CODE> command.
By Internet convention, the network number is 127.0.0.0, and the local
host address is 127.0.0.1.  If everything is configured correctly, you
should be able to telnet to your own machine and get a <CODE>login</CODE>
prompt.
<P>Make sure that <CODE>/etc/hosts.lpd</CODE> contains the machine's host
name.
<P>If your machine has a network-aware <CODE>lpd</CODE>, like the one that
comes with LPRng, make sure that <CODE>/etc/lpd.perms</CODE> is configured
correctly.
<P>Also look at the <CODE>Printing-HOWTO</CODE> ``
<A HREF="Linux-FAQ-2.html#Where can I get the HOWTO's and other documentation?">Where can I get the HOWTO's and other documentation?</A>
''.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="Timestamps on files on MS-DOS partitions are set incorrectly."></A> <A NAME="ss6.14">6.14 Timestamps on files on MS-DOS partitions are set incorrectly. </A>
</H2>

<P>There is a bug in the program ``<CODE>clock</CODE>'' (often found in
<CODE>/sbin</CODE>).  It miscounts a time zone offset, confusing seconds
with minutes or something like that.  Get a recent version.
<P>-------------------------------------------------------------------------------
<P>
<H2><A NAME="How do I get LILO to boot the &lt;tt>vmlinux&lt;/tt> file?"></A> <A NAME="ss6.15">6.15 How do I get LILO to boot the <CODE>vmlinux</CODE> file? </A>
</H2>

<P>>From kernel versions 1.1.80 on, the compressed kernel image,
which is what LILO needs to find, is in
<CODE>arch/i386/boot/zImage</CODE>.  The <CODE>vmlinux</CODE> file in the root
directory is the uncompressed kernel, and you shouldn't try to boot
it.
<P>This was changed to make it easier to build kernel versions for
several different processors from one source tree.
<P>===============================================================================
<P>
<HR>
<A HREF="Linux-FAQ-7.html"><IMG SRC="next.gif" ALT="Next"></A>
<A HREF="Linux-FAQ-5.html"><IMG SRC="prev.gif" ALT="Previous"></A>
<A HREF="Linux-FAQ.html#toc6"><IMG SRC="toc.gif" ALT="Contents"></A>
</BODY>
</HTML>