Category Archives: Linux

APG ( automated password generator ) runs slow on CentOS

I use apg to generate random password all the time. On a new vpn server I built, apg was taking a long time to generate a pass, I traced it back to “not enough entropy”

You can see how much entropy you have with this command:

cat /proc/sys/kernel/random/entropy_avail

It should be at least in the hundreds, if its not you can use rng-tools to help you out.

sudo yum install rng-tools
echo “rngd -r /dev/urandom -o /dev/random -f -t 3″ >> /etc/rc.local
rngd -r /dev/urandom -o /dev/random -f -t 3

that should generate enough entropy and you can go back to doing some real work :)

CentOS 5.4 – install oracle client

oracle install will need :

yum install xorg-x11-deprecated-libs

CentOS 5 – add dag repo

rpm -Uvh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

ubuntu – openvpn client does not update resolve.conf

install resolvconf :

sudo apt-get install resolvconf

add to your openvpn client config :

up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Linux HA – CRM commands

Small reminder as I always tend to forget these :

Dump the CRM cib db :

cibadmin -Q > cib.backup.xml

Modify a resource , dump the cib, modify the xml for the resources and then import using cibadmin -M

cibadmin -V -M -o resources -x modified_resources.xml

Add a resource , create the xml for the resource and them use -C

cibadmin -V -C -o resources -x new_resource.xml

Move resource from one location to another, -f to force it …

crm_resource -M -r resource -H host
crm_resource -M -r resource -H host -f