msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

08 Sep 2008 Using sudo in RedHat

This post describes how to allow users in the wheel group to use the sudo command without being prompted for the root password

  1. Edit /etc/sudoers
    Uncomment the line

    %WHEEL ALL=(ALL) NOPASSWD: ALL
  2. Add a user to the wheel group
    # gpasswd -a username wheel
  3. This does also work on Fedora and other Redhat based distributions.

    Tags: , ,

    Posted by

03 Sep 2008 Using arp_announce

It is possible to control which source address is put in to ARP headers using the ARP_ANNOUNCE option in the kernel.

It takes the following values.

0 (default) Any local address
1 Use address from the same subnet as the target address
2 prefer primary address.

This is worth knowing because the default can give some very strange results when routing packets with linux.

To test this you can run the following command

# sysctl -w net.ipv4.conf.all.arp_announce=1

To make it a permanent solution add a line like this to /etc/sysctl.conf

net.ipv4.conf.all.arp_announce = 1

Tags: ,

Posted by

23 Nov 2007 Remove duplicate packages when querying the rpm database

Today I had to solve a RPM problem on a Red Hat Enterprise Linux WS release 4 (Nahant Update 6) system (RHEL4) where there were duplicate packages when querying the rpm database. This had happened after an upgrade to update 6 using up2date from the command line.

It seemed like i386 and x64 packages had gotten installed on some packages and this caused some problems, like logon authentication and execution of some programs.

Trying to remove a duplicate rpm package

# rpm -e libtool-libs-1.5.6-4.El4.2

gave the error message

error: "libtool-libs-1.5.6-4.El4.2" specifies multiple packages

After searching the Red Hat knowledge base I located article Why do I see duplicate packages when querying the rpm database? where it says it is necessary to specify the architecture of the package to remove.

# rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}\\n

If you add %{RELEASE} you can also determine if the package is from other package vendors like RPMForge.

Since this was a x64 system, I wanted to remove the i386 version

# rpm -e libtool-libs-1.5.6-4.El4.2.i386

This had to be done with every duplicate package on the system.
Locate the i386 packages that interfered with the x64 packages can be done using the command

rpm -qa | sort | uniq -d

These packages have dependencies so you have to add these manually, really fun job to do.

Edit:
In RHEL5 you can use yum to remove packages in a easy way

yum remove <package>.i386
yum remove <package>.x86_64

Tags: , , , ,

Posted by