Best of Technical Support

Various

Issue #87, July 2001

Our experts answer your technical questions.

Tar over rsh

I'm running a small private LAN with Linux Red Hat 7.0. The following command was entered on system “lucy”, with the resultant message:

[root@lucy]# tar cvf testbed:/home/someuser file.txt
Permission denied.
tar: testbed\:/home/someuser: Cannot open:
  Input/output error
tar: Error is not recoverable: exiting now

This output is from the /var/log/messages file on the system “testbed”:

Mar 30 08:14:57 testbed pam_rhosts_auth[853]:
  denied to root@lucy as root: access not allowed
Mar 30 08:14:57 testbed in.rshd[853]: rsh denied to
  root@lucy as root:
Permission denied.
Mar 30 08:14:57 testbed in.rshd[853]:
  rsh command was '/etc/rmt'
I have been reading about PAM but have not figured it out yet. Could someone give me assistance to make this command work? I don't mind if I temporally dummy up my security in /etc/pam.d, but my last attempt made it impossible to even log in. Ouch! —Les Hilliard, les.hilliard@home.com

On the machine where you want to put the tar file, create a .rhosts file in the home directory, with 0400 permissions. The .rhosts file should a single line, “X.X.X.X user”, where X.X.X.X is the IP address of the machine where the tar command is run and the user is the user id of the person running the command. Run the following command on the other machine:

tar -cvf root@mm:/root/aaa.tar work/

where mm is the remote machine name or IP address and work is the local directory. Beware that this will also allow rlogin without a prompt for password. —Usman S. Ansari, uansari@yahoo.com

Error in Loading Shared Libraries

I recently installed Netscape 4.7.6 on my Linux machine (the machine was recently rebuilt, so the kernel and libraries are very recent). When I was trying to run it, I got the following error message:

/usr/local/bin/netscape
/usr/local/bin/netscape: error in loading
  shared libraries:
libstdc++-libc6.1-1.so.2: cannot open shared
  object file: No such file or directory

Checking my libraries confirmed that I didn't have that particular library installed, but a newer one:

# cd /usr/lib
# ls libstdc++*
libstdc++-3-libc6.1-2-2.10.0.a
libstdc++.a.2.10.0
libstdc++-3-libc6.1-2-2.10.0.so
libstdc++-libc6.1.so
libstdc++-libc6.1-2.a.3
libstdc++-libc6.1-2.so.3
I successfully resolved the problem by providing a symbolic link to the newer library:
# ln -s libstdc++-libc6.1-2.so.3
  libstdc++-libc6.1-1.so.2
This solved the problem, and Netscape is running smoothly. However, this incident left me with a number of questions:

What is the meaning of the .2 and .3 at the end of the filename?

Is this solution appropriate? I would have liked to create a shorter link, like libstdc++-libc6.1.so, but that didn't work. Would it have been more appropriate to actually find libc6.1-1 and install it next to the existing one?

My assumption is the Netscape binaries had the library version hardcoded (I believe this version of Netscape is not available as source code); is that correct? —Michael, micky@alum.mit.edu

The reason a library maintainer changes a revision is there is a significant change in the underlying code or interface. The maintainer usually feels it would not be wise for a program dynamically linked with an older version of the library to automatically work with the newer version. “Appropriate” is in the eyes of the beholder. It is possible that the dynamically linked program you are “tricking” could disastrously crash, destroying itself and other things. Most likely, though, it won't. But, it definitely would be safer to find the actual dynamically linked library. The Netscape 4.x binaries have some interfaces (to the dynamically linked library) and versions hard coded. —Christopher Wingert, cwingert@qualcomm.com

Mandrake without X

I am currently using Mandrake 7.2 as a server platform. I do not want to run X. I have tried all configuration options on the Mandrake install, and even manually deselected X components, but the install just goes ahead and installs X anyway. Is there a way of stopping X and X components from being installed?

Also, when in console mode, is there a way to stop the monitor from going into power save mode? I have disabled the apm dæmon and power management in the BIOS, but the monitor keeps shutting down. —Gerard Nicol, gerard.nicol@tapems.com.au

Use rpm -qa to uninstall packages you may not need. You should also keep a list of the packages you uninstall so you can install them again, if needed. To disable power saving in the console, do setterm -blank 0. —Usman S. Ansari, uansari@yahoo.com

How Can I Set the FTP Welcome Message?

I want to be able to change both the initial message displayed when a user opens an FTP connection to my system and the login message. I know this is supposed to happen in ftpaccess, but I can't for the life of me find the files referred to in the configuration files /welcome.msg and .message. Is it that these files simply don't exist, and the messages displaying are defaults? Help. —Jon Dewey, jmdewey@clunet.edu

These files exist in your anonymous ftp area. On Red Hat this is usually /home/ftp. If you place a text file called welcome.msg in that directory, it will appear when someone anonymously logs into your machine. —Christopher Wingert, cwingert@qualcomm.com

Wiping a Hard Drive MBR

I can't install Linux due to an MBR problem and the message RAMDISK: Compressed file at block 0.

I have tried to cfdisk but no luck. I tried all sorts of boot/rescue diskettes without luck for two years now.

How can I wipe this hard disk clean before I install RHLinux? —Joseph Lalingo, joseph.lalingo@ablelink.org

You can wipe the MBR with lilo -u. —Christopher Wingert, cwingert@qualcomm.com

Kernel Panic on Boot

I installed Red Hat 7.0 as a dual boot with Windows 98 on my Toshiba laptop. Now when I boot, I am unable to get to either operating system, just a series of bracketed numbers, and the following message:

Code:89 02 85 c0 74 03 89 50 04 b8 01 00 00 00 eb
  03 90 31 c0 c7
Aiee, killing interrupt handler
Kernel panic: Attempted to kill the idle task!
In interrupt handler - not syncing

I am unable now to boot from diskette or CD-ROM. —Neil O'Connor, bowstn@yahoo.com

Boot your laptop using the rescue floppy created at install time, and run /sbin/lilo. This will reinstall LILO, and you should be able to boot from the hard disk again. —Usman S. Ansari, uansari@yahoo.com