Category Archives: CentOS

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 :)

WebDAV server on CentOS – Provider encountered an error while streaming a multistatus PROPFIND response

I’ve encountered this error when trying to connect to web dav enabled folder.
I saw some web posts to add :

RewriteEngine Off

However that did not work for me, I finally traced it back to SElinux, I was using a custom folder and needed to change the permissions :

[user@server]>sudo stat -Z -c %C /var/webdav
user_u:object_r:user_home_dir_t

Compared to /var/www

[user@server]>sudo stat -Z -c %C /var/www
system_u:object_r:httpd_sys_content_t

A change of SElinux permissions and all was well :

[user@server]> chcon -R -u system_u -r object_r -t httpd_sys_content_t /var/webdav

Issues with FTP on CentOS 5.4

If you’re getting “data connection refused errors” when trying to ftp onto a CentOS box, make sure your ip_conntrack_ftp is loaded.
The default RH/CentOS iptables script includes a conntrack statement :

-A RH-Firewall-1-INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

but does not load the ftp module.
to fix on the fly run :

modprove ip_conntrack_ftp

to make sure it happens again on boot modify your /etc/sysconfig/iptables-config modules list :

IPTABLES_MODULES=”ip_conntrack_netbios_ns ip_conntrack_ftp”

Centos : permission denied when mounting nfs share from client

one thing to check is that /proc/nfs is there, if not , mount it.

mount -t nfsd nodev /proc/fs/nfsd

CentOS 5.4 – install oracle client

oracle install will need :

yum install xorg-x11-deprecated-libs