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

19 Jan 2010 Change ethernet settings using ethtool

Force network speed on a network card to 100 MBit Full Duplex and in the same time disable auto negotiation

# ethtool -s eth0 speed 100 duplex full autoneg off

These settings are active until you reboot the machine or restart the network.

In order to keep this change on each system reboot, append the following line in the following Redhat file /etc/sysconfig/network-scripts/ifcfg-eth0

ETHTOOL_OPTS="speed 100 duplex full autoneg off"

An alternative tool to use to change the settings is mii-tool.

Tags: ,

Posted by

25 May 2009 Replace RPMforge packages with Redhats own on a RHEL5 system

This post came to life after experiencing some upgrade problems with missing dependencies and RPM packages from RPMforge and Redhat Enterprise Linux Client release 5. The prosess to remove or replace the packages was to remove RPMforge as a package repository and replace the blocking packages with Redhats own packages.

The process of replacing RPMforge packages with Redhats own packages
First we remove rpmforge as package repository

rpm -e rpmforge

This command removes the /etc/yum.repos.d/rpmforge.repo file.

Then we list all packages installed from the RPMforge repository to get an overview of the packages causing problems on the system.

rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}-%{RELEASE}\\n|sort|grep el5.rf

The result

dnsmasq-2.47-x86_64-1.el5.rf
libsndfile-1.0.17-x86_64-1.el5.rf
lftp-3.7.12-x86_64-1.el5.rf
...

The rf ending tells you that these packages are RPMforge packages. This command also tells you if it is 32bit (i386) or 64bit (x86_64) packages. I’ve described the prosess of removing 32- and 64bits packages in a earlier post named Remove duplicate packages when querying the rpm database.

Howto remove 64bit packages

yum remove libsndfile.x86_64

Next we will download the packages we want to replace, in my case dnsmasq

On a RHEL5 system

yumdownloader dnsmasq

If you don’t have yumdownloader in your system you have to install the yum-utils package.

On a RHEL4 system

up2date -d dnsmasq

Then we replace the RPMforge RPM package with Redhats own package

# rpm -Uvh --replacepkgs --oldpackage dnsmasq-2.45-1.el5_2.1.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:dnsmasq                ########################################### [100%]

If you don’t use the –oldpackage option you might get an error message like this

package dnsmasq-2.47-1.el5.rf.x86_64 (which is newer than dnsmasq-2.45-1.el5_2.1.x86_64) is already installed

I continued removing RPMForge packages until yum managed to resolve any unresolved dependencies.

Tags: , , ,

Posted by

23 Dec 2008 Force a user to change password upon first login

This is how you can force a Redhat user to change his password upon first login on a Redhat 5 installation. This might work on other versions and distributions…

  1. First lock the account to prevent the user from logging in until the change has been made
  2. # usermod -L <username>
  3. Change the password expiration date to 0 to ensure the user changes the password during the next login attempt
  4. # chage -d 0 <username>
  5. To unlock the account after the change do the following:
  6. # usermod -U <username>

Tags: ,

Posted by

18 Sep 2008 Redhat documentation in one place

http://www.redhat.com/docs/manuals/enterprise/ is a documentation page I always return to when I manage Redhat Enterprise Linux systems.

Redhat has put a lot of effort in their documentation and even allow you to download them as PDF documents.

The documentation below is for RHEL5.2

Deployment Guide May 21, 2008 PDF
Installation Guide May 21, 2008 PDF
Virtualization Guide May 21, 2008 PDF
Cluster Suite Overview May 21, 2008 PDF
Cluster Administration May 21, 2008 PDF
LVM Administrator’s Guide May 21, 2008 PDF
Global File System May 21, 2008 PDF
Using GNBD with GFS May 21, 2008 PDF
Linux Virtual Server Administration May 21, 2008 PDF
Using Device-Mapper Multipath May 21, 2008 PDF
Tuning and Optimizing Red Hat Enterprise Linux for Oracle 9i and 10g Databases Nov 2007 PDF
Online Storage Reconfiguration Guide (Beta) July 2, 2008 PDF

These documents is a great resource if you plan to become a RHCT or RHCE.

Tags: ,

Posted by

17 Sep 2008 Disable IPv6 on Redhat RHEL4

First you remove this line from /etc/modprobe.conf if this line exists.

alias net-pf-10 ipv6

Add the following line to /etc/modprobe.conf

alias net-pf-10 off

Reboot the system. IPv6 is now disabled.

To re-enable IPv6, remove the alias net-pf-10 off line from /etc/modprobe.conf and reboot the machine.

I’ve also made a post about how to disable IPv6 on RHEL5.

Tags: ,

Posted by