Password change error/not working…..

July 27, 2008

Can’t update password of an account from WHM. While executing ‘passwd’ command in terminal gets “passwd: Module is unknown” error:

[root@www2 ~]# passwd
Changing local password for root
passwd: Module is unknown
root@www2 ~]#
[root@acela ~]# yum list |  grep -i cracklib
cracklib.i386                            2.8.9-1.3              installed
cracklib-dicts.i386                      2.8.9-1.3              installed

Install the above packages and fix the issue.

:Limit the number of Telnet sessions coming from the same remote system

July 27, 2008

The /etc/xinetd.d/telnet file can be used to set the maximum number of concurrent telnet sessions from the same source IP address. Using the per_source directive we can define the limit.

# default: on
# description: The telnet server serves telnet sessions; it uses \
#       unencrypted username/password pairs for authentication.
service telnet
{
        disable = no
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        per_source      = 2
}

In above example the simultaneous telnet connections are limited to two. After modifying the above file, restart the xinetd daemon

service xinetd restart

Mysqlhotcopy error on copying a table.

July 24, 2008

mysqlhotcopy Dbname./tablename/ /root/transfer/
Invalid db.table name ‘DB.DB`.`Table’ at /usr/bin/mysqlhotcopy line 854.
A quick  fix is to strip the database prefix from the list of tables. This
happens in function get_list_of_tables(). Adding the following line right behind line 835
will strip the prefixing schema:

map { s/^.*?\.//o } @dbh_tables;


Error while enabling modules on PHP using PECL

July 18, 2008

Sometimes, you may get an error while installing modules using PECL command. An example is illustrated below.

root@root [~]# pecl install memcache
downloading memcache-2.2.3.tgz …
Starting to download memcache-2.2.3.tgz (27,304 bytes)
………done: 27,304 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version:         20020918
Zend Module Api No:      20020429
Zend Extension Api No:   20050606
/usr/local/bin/phpize: /tmp/pear/temp/memcache/build/shtool: /bin/sh: bad interpreter: Permission denied
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

Fix :

mount -o remount,exec,suid /tmp


Install VLC VideoLan on CentOS system

July 14, 2008

Unlike the version for windows that has everything included for linux, VLC, needs numerous bookstores among which those that it exploits Mplyaer and gxine. We can install the all (excluded the codecs) through the DAG reposity for yum.

We first of all add to the file /etc/yum.conf the reposity DAG:

[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=1 enabled=1

gpgcheck=1 is already planned to 1: in case he is wanted to directly care the KEY through rpm, to go on the site of DAG and to care the KEY.

Get the codec package and compile/install it:

Note: The last version of the codecses you can find her to the address: http://www.mplayerhq.hu/design7/dload.html

cd /usr/src
wget http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
bunzip2 MPlayer-1.0rc2.tar.bz2
tar xvf MPlayer-1.0rc2.tar
cd MPlayer-1.0rc2
./configure
make
make install
cd ..

At the end (it will ask for a few minutes), you perform yum to install mplayer and gxine:

yum install mplayer* gxine

We proceed to the download of VLC source code from the site: Note: in this installation we avoid the use of some not necessary functions of base for standard installations (for example: ffmpeg and skins).

cd /usr/src
wget http://download.videolan.org/pub/videolan/vlc/0.8.6c/vlc-0.8.6c.tar.gz
tar zxvf vlc-0.8.6c.tar.gz
cd vlc-0.8.6c
./configure –disable-mad –enable-ffmpeg=no –disable-libmpeg2 –disable-wxwidgets –disable-skins2
make
make install

The installation is ended: we can find vlc in /usr/local/bin/vlc


Block an IP with Route command

July 11, 2008

Inorder to block an IP address in the server with ‘route’ command in the kernel routing table.

# route add IP_ADDRESS reject

To view the status :

# netstat -nr
# route -n

You can verify whether the ‘FLAG’ of the IP address is ‘!H’

To remove the block:

# route del IP_ADDRESS reject

You can also specify the IP ranges with corresponding Subnet Mask.

# route add -net IP_ADDRESS netmask 255.255.XXX.XXX reject