Showing posts with label Troubleshooting. Show all posts
Showing posts with label Troubleshooting. Show all posts

13 November 2007

Linux rpm package failed to install,How can I fix this?

Problem Statement:

I downloaded an RPM file to a Windows machine using Internet Explorer then transferred it to my Linux machine. When I try to install it with the RPM command, I immediately get a prompt back and it does not install.

Solution:

When downloading a file, IE sometimes places square brackets in the resulting filename. When the rpm command is run on a file with square brackets, it fails with no error message and does not install the package. The square brackets are a part of the Linux bash shell and are reserved for a technique called file globbing.

To fix this, rename the RPM with the mv command. When specifying the filename of the RPM at a shell prompt,type the
first few letters, then use the Tab key to autocomplete the name. This ensures that the brackets in the filename are properly delimited. Rename the file to so that it does not contain square brackets. For example:

mv kernel-2\[1\].4.21-20.EL.i686.rpm kernel-2.4.21-20.EL.i686.rpm
Alternatively, you can enclose the file in single quotes, like so:
mv 'kernel-2[1].4.21-20.EL.i686.rpm' kernel-2.4.21-20.EL.i686.rpm

After renaming the file, the rpm command can be used to install the package successfully.

Password protect single user mode in Linux

The single user mode in Linux is considered the rescue mode.However,anyone who gets physical access to the machine could easily change the root password by booting into single user mode.

This is a security concern in Linux.

So to password protect the single user mode,add/append the following line in your
/etc/inittab file:

su:S:wait:/sbin/sulogin

Now,whenever the system is booted in single user mode,it'll first prompt for the 'root' password.